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