diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 45a2dfa..bbeb056 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -85,6 +85,24 @@ export default async function RootLayout({ ? cookieLocale : defaultLocale; + const rawMarriageCookie = + cookieStore.get("HABIB_MARRIAGE_DATA")?.value ?? + cookieStore.get("habib_marriage_data")?.value; + + let initialMarriageJson: string | null = null; + if (rawMarriageCookie) { + try { + const decoded = decodeURIComponent(rawMarriageCookie); + JSON.parse(decoded); + initialMarriageJson = decoded; + } catch { + try { + JSON.parse(rawMarriageCookie); + initialMarriageJson = rawMarriageCookie; + } catch {} + } + } + return ( + {initialMarriageJson && ( +