|
|
@ -33,7 +33,14 @@ export default function EntryRouteResolver({ |
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
let isActive = true; |
|
|
let isActive = true; |
|
|
|
|
|
|
|
|
|
|
|
const announceReady = () => { |
|
|
|
|
|
if (typeof window !== "undefined") { |
|
|
|
|
|
window.__announceHabibWebReady?.(); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const goToIntro = () => { |
|
|
const goToIntro = () => { |
|
|
|
|
|
announceReady(); |
|
|
if (!anonymousEntryVisible) { |
|
|
if (!anonymousEntryVisible) { |
|
|
router.replace(localizePath("/intro", locale)); |
|
|
router.replace(localizePath("/intro", locale)); |
|
|
} |
|
|
} |
|
|
@ -49,6 +56,7 @@ export default function EntryRouteResolver({ |
|
|
|
|
|
|
|
|
const cachedEntryPath = getCachedMarriageEntryPath(); |
|
|
const cachedEntryPath = getCachedMarriageEntryPath(); |
|
|
if (cachedEntryPath) { |
|
|
if (cachedEntryPath) { |
|
|
|
|
|
announceReady(); |
|
|
router.replace(localizePath(cachedEntryPath, locale)); |
|
|
router.replace(localizePath(cachedEntryPath, locale)); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
@ -67,6 +75,7 @@ export default function EntryRouteResolver({ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
announceReady(); |
|
|
router.replace(localizePath(getSubmitPath(profile), locale)); |
|
|
router.replace(localizePath(getSubmitPath(profile), locale)); |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.warn("Could not resolve entry route", error); |
|
|
console.warn("Could not resolve entry route", error); |
|
|
|