|
|
|
@ -31,7 +31,7 @@ export default function FindingMatchClient() { |
|
|
|
const { dictionary: t, locale } = useI18n(); |
|
|
|
const { isAdvisorOpen, openAdvisors, closeAdvisors } = |
|
|
|
useMarriageAdvisorsOverlay(); |
|
|
|
const { data: profile, isLoading } = useMarriageProfileQuery({ |
|
|
|
const { data: profile, isLoading, isFetched } = useMarriageProfileQuery({ |
|
|
|
refetchInterval: 3000, |
|
|
|
}); |
|
|
|
|
|
|
|
@ -50,11 +50,16 @@ export default function FindingMatchClient() { |
|
|
|
if (!profile) { |
|
|
|
return; |
|
|
|
} |
|
|
|
// Don't bounce away from finding-match if we only have preliminary initialData
|
|
|
|
// with pending_info before the fresh server query finishes
|
|
|
|
if (!isFetched && profile.status === "pending_info") { |
|
|
|
return; |
|
|
|
} |
|
|
|
const targetPath = getSubmitPath(profile); |
|
|
|
if (targetPath !== "/finding-match") { |
|
|
|
router.replace(localizePath(targetPath, locale)); |
|
|
|
} |
|
|
|
}, [profile, locale, router]); |
|
|
|
}, [profile, isFetched, locale, router]); |
|
|
|
|
|
|
|
// Signal Flutter to lift its loading cover immediately so page renders with 0ms latency.
|
|
|
|
useHabibWebReady(true); |
|
|
|
|