This commit is contained in:
parent
705aebb011
commit
89d1617c3b
|
|
@ -11,6 +11,7 @@ import { cookies } from "next/headers"
|
||||||
import { ReactNode } from "react"
|
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"
|
||||||
|
|
||||||
const inter = Inter({ subsets: ["latin"] })
|
const inter = Inter({ subsets: ["latin"] })
|
||||||
const APP_NAME = "ChatAI UI"
|
const APP_NAME = "ChatAI UI"
|
||||||
|
|
@ -116,6 +117,12 @@ export default async function RootLayout({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="en" suppressHydrationWarning>
|
<html lang="en" suppressHydrationWarning>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
{/* ✅ 注入客户端运行时环境变量 */}
|
||||||
|
<Script src="/env.js" strategy="beforeInteractive" />
|
||||||
|
</head>
|
||||||
|
|
||||||
<body className={inter.className}>
|
<body className={inter.className}>
|
||||||
<Providers attribute="class" defaultTheme="dark">
|
<Providers attribute="class" defaultTheme="dark">
|
||||||
<TranslationsProvider
|
<TranslationsProvider
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue