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
|
||||
|
||||
console.log("[layout.tsx]Session Data: ", sessionData)
|
||||
console.log("[layout.tsx]Session Error: ", sessionError)
|
||||
// const session = (await supabase.auth.getSession()).data.session
|
||||
const { data, error } = await supabase.auth.getSession();
|
||||
if (error) {
|
||||
console.log("[layout.tsx]Session Error: ", error);
|
||||
} else {
|
||||
console.log("[layout.tsx]Session Data: ", data.session);
|
||||
}
|
||||
|
||||
const { t, resources } = await initTranslations(locale, i18nNamespaces)
|
||||
|
||||
|
|
@ -102,7 +105,7 @@ export default async function RootLayout({
|
|||
>
|
||||
<Toaster richColors position="top-center" duration={3000} />
|
||||
<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>
|
||||
</TranslationsProvider>
|
||||
</Providers>
|
||||
|
|
|
|||
Loading…
Reference in New Issue