This commit is contained in:
parent
9e75902cea
commit
8d9a52c917
|
|
@ -13,6 +13,7 @@ import { ReactNode } from "react"
|
||||||
import "./globals.css"
|
import "./globals.css"
|
||||||
import { getRuntimeEnv } from "@/lib/ipconfig" // 新增引入
|
import { getRuntimeEnv } from "@/lib/ipconfig" // 新增引入
|
||||||
import Script from "next/script"
|
import Script from "next/script"
|
||||||
|
import { Suspense } from "react"
|
||||||
|
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] })
|
const inter = Inter({ subsets: ["latin"] })
|
||||||
|
|
@ -168,9 +169,11 @@ export default async function RootLayout({
|
||||||
resources={resources}
|
resources={resources}
|
||||||
>
|
>
|
||||||
<Toaster richColors position="top-center" duration={3000} />
|
<Toaster richColors position="top-center" duration={3000} />
|
||||||
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
<Suspense fallback={null}>
|
||||||
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
<div className="bg-background text-foreground flex h-dvh flex-col items-center overflow-x-auto">
|
||||||
</div>
|
{data.session ? <GlobalState>{children}</GlobalState> : children}
|
||||||
|
</div>
|
||||||
|
</Suspense>
|
||||||
</TranslationsProvider>
|
</TranslationsProvider>
|
||||||
</Providers>
|
</Providers>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue