diff --git a/components/go-back-button.tsx b/components/go-back-button.tsx index 224d7b1..3cb2b1e 100644 --- a/components/go-back-button.tsx +++ b/components/go-back-button.tsx @@ -4,9 +4,19 @@ import { useRouter } from "next/navigation"; export default function GoBackButton() { const router = useRouter(); + + const handleBack = () => { + if (window.history.length > 1) { + router.back(); + } else { + router.push("/"); + } + }; + return (