This commit is contained in:
hailin 2025-06-25 18:51:49 +08:00
parent 40f5856aa0
commit 92ca21d2cb
2 changed files with 15 additions and 17 deletions

View File

@ -10,7 +10,7 @@ import { cookies } from "next/headers"
import { ReactNode } from "react" import { ReactNode } from "react"
import "./globals.css" import "./globals.css"
import { Suspense } from "react" import { Suspense } from "react"
import { RuntimeEnvScript } from "@/components/utility/runtime-env-script" import { RuntimeEnvScript } from "@/components/utility/runtime-env-provider"
const inter = Inter({ subsets: ["latin"] }) const inter = Inter({ subsets: ["latin"] })
@ -109,22 +109,20 @@ export default async function RootLayout({
</head> </head>
<body className={inter.className}> <body className={inter.className}>
{/* <RuntimeEnvProvider> */} <Providers attribute="class" defaultTheme="dark">
<Providers attribute="class" defaultTheme="dark"> <TranslationsProvider
<TranslationsProvider namespaces={i18nNamespaces}
namespaces={i18nNamespaces} locale={locale}
locale={locale} resources={resources}
resources={resources} >
> <Toaster richColors position="top-center" duration={3000} />
<Toaster richColors position="top-center" duration={3000} /> <Suspense fallback={null}>
<Suspense fallback={null}> <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"> {data.session ? <GlobalState>{children}</GlobalState> : children}
{data.session ? <GlobalState>{children}</GlobalState> : children} </div>
</div> </Suspense>
</Suspense> </TranslationsProvider>
</TranslationsProvider> </Providers>
</Providers>
{/* </RuntimeEnvProvider> */}
</body> </body>
</html> </html>
) )