diff --git a/src/app/intro/page.tsx b/src/app/intro/page.tsx index 2ebc320..d6af97e 100644 --- a/src/app/intro/page.tsx +++ b/src/app/intro/page.tsx @@ -1,7 +1,7 @@ "use client"; import Image from "next/image"; -import { useState } from "react"; +import { useEffect, useState } from "react"; import { useRouter } from "next/navigation"; import Button from "@/components/ui/button"; import NavigationButton from "@/components/ui/navigation-button"; @@ -39,11 +39,19 @@ export default function Intro() { const router = useRouter(); const { dictionary: t, locale } = useI18n(); const { data: profile, refetch } = useMarriageProfileQuery({ - enabled: authBridge.isAuthenticated(), + retry: false, }); const [isReportSheetOpen, setIsReportSheetOpen] = useState(false); const [isSubmitting, setIsSubmitting] = useState(false); + useEffect(() => { + if (!profile) { + return; + } + + router.replace(localizePath(getSubmitPath(profile), locale)); + }, [locale, profile, router]); + const handleSubmit = async () => { if (isSubmitting) { return;