This commit is contained in:
parent
582ca179d6
commit
49dd5285d1
|
|
@ -122,28 +122,38 @@ export default async function RootLayout({
|
|||
|
||||
//console.log("[layout.tsx]..............current locale: ", {locale});
|
||||
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
|
||||
{/* <head>
|
||||
{/* ✅ 注入客户端运行时环境变量 */}
|
||||
<Script src="/env.js" strategy="beforeInteractive" />
|
||||
</head> */}
|
||||
// return (
|
||||
// <html lang="en" suppressHydrationWarning>
|
||||
// <body className={inter.className}>
|
||||
// <Providers attribute="class" defaultTheme="dark">
|
||||
// <TranslationsProvider
|
||||
// namespaces={i18nNamespaces}
|
||||
// locale={locale}
|
||||
// resources={resources}
|
||||
// >
|
||||
// <Toaster richColors position="top-center" duration={3000} />
|
||||
// <div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
||||
// {data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
// </div>
|
||||
// </TranslationsProvider>
|
||||
// </Providers>
|
||||
// </body>
|
||||
// </html>
|
||||
// )
|
||||
|
||||
return (
|
||||
<Providers attribute="class" defaultTheme="dark">
|
||||
<TranslationsProvider
|
||||
namespaces={i18nNamespaces}
|
||||
locale={locale}
|
||||
resources={resources}
|
||||
>
|
||||
<Toaster richColors position="top-center" duration={3000} />
|
||||
<div className={`${inter.className} bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto`}>
|
||||
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
</div>
|
||||
</TranslationsProvider>
|
||||
</Providers>
|
||||
)
|
||||
|
||||
<body className={inter.className}>
|
||||
<Providers attribute="class" defaultTheme="dark">
|
||||
<TranslationsProvider
|
||||
namespaces={i18nNamespaces}
|
||||
locale={locale}
|
||||
resources={resources}
|
||||
>
|
||||
<Toaster richColors position="top-center" duration={3000} />
|
||||
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
||||
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||
</div>
|
||||
</TranslationsProvider>
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue