This commit is contained in:
parent
9e75902cea
commit
8d9a52c917
|
|
@ -13,6 +13,7 @@ import { ReactNode } from "react"
|
|||
import "./globals.css"
|
||||
import { getRuntimeEnv } from "@/lib/ipconfig" // 新增引入
|
||||
import Script from "next/script"
|
||||
import { Suspense } from "react"
|
||||
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] })
|
||||
|
|
@ -168,9 +169,11 @@ export default async function RootLayout({
|
|||
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>
|
||||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue