This commit is contained in:
hailin 2025-05-21 14:51:33 +08:00
parent 8033990074
commit 60ee729ace
2 changed files with 32 additions and 47 deletions

View File

@ -122,38 +122,38 @@ export default async function RootLayout({
//console.log("[layout.tsx]..............current locale: ", {locale});
// 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 (
<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>
)
// 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>
// )
}

View File

@ -1,15 +0,0 @@
// _document.tsx
import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() {
return (
<Html lang="en" suppressHydrationWarning>
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}