This commit is contained in:
parent
ab92b72206
commit
341ca458b8
|
|
@ -82,10 +82,13 @@ export default async function RootLayout({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const session = (await supabase.auth.getSession()).data.session
|
// const session = (await supabase.auth.getSession()).data.session
|
||||||
|
const { data, error } = await supabase.auth.getSession();
|
||||||
console.log("[layout.tsx]Session Data: ", sessionData)
|
if (error) {
|
||||||
console.log("[layout.tsx]Session Error: ", sessionError)
|
console.log("[layout.tsx]Session Error: ", error);
|
||||||
|
} else {
|
||||||
|
console.log("[layout.tsx]Session Data: ", data.session);
|
||||||
|
}
|
||||||
|
|
||||||
const { t, resources } = await initTranslations(locale, i18nNamespaces)
|
const { t, resources } = await initTranslations(locale, i18nNamespaces)
|
||||||
|
|
||||||
|
|
@ -102,7 +105,7 @@ export default async function RootLayout({
|
||||||
>
|
>
|
||||||
<Toaster richColors position="top-center" duration={3000} />
|
<Toaster richColors position="top-center" duration={3000} />
|
||||||
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
||||||
{session ? <GlobalState>{children}</GlobalState> : children}
|
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||||
</div>
|
</div>
|
||||||
</TranslationsProvider>
|
</TranslationsProvider>
|
||||||
</Providers>
|
</Providers>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue