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 "./globals.css"
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"] })
@ -109,22 +109,20 @@ export default async function RootLayout({
</head>
<body className={inter.className}>
{/* <RuntimeEnvProvider> */}
<Providers attribute="class" defaultTheme="dark">
<TranslationsProvider
namespaces={i18nNamespaces}
locale={locale}
resources={resources}
>
<Toaster richColors position="top-center" duration={3000} />
<Suspense fallback={null}>
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
{data.session ? <GlobalState>{children}</GlobalState> : children}
</div>
</Suspense>
</TranslationsProvider>
</Providers>
{/* </RuntimeEnvProvider> */}
<Providers attribute="class" defaultTheme="dark">
<TranslationsProvider
namespaces={i18nNamespaces}
locale={locale}
resources={resources}
>
<Toaster richColors position="top-center" duration={3000} />
<Suspense fallback={null}>
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
{data.session ? <GlobalState>{children}</GlobalState> : children}
</div>
</Suspense>
</TranslationsProvider>
</Providers>
</body>
</html>
)