diff --git a/chatdesk-ui/app/[locale]/layout.tsx b/chatdesk-ui/app/[locale]/layout.tsx
index 6fd7f3c..9d79312 100644
--- a/chatdesk-ui/app/[locale]/layout.tsx
+++ b/chatdesk-ui/app/[locale]/layout.tsx
@@ -122,48 +122,38 @@ export default async function RootLayout({
//console.log("[layout.tsx]..............current locale: ", {locale});
- return (
-
+ // return (
+ //
+ //
+ //
+ //
+ //
+ //
+ // {data.session ? {children} : children}
+ //
+ //
+ //
+ //
+ //
+ // )
-
- {/* 使用 next/script 注入 public/env.js 文件 */}
-
-
-
-
-
-
-
-
-
- {data.session ? {children} : children}
-
-
-
-
-
- )
-
- // return (
- //
- //
- //
- //
- // {data.session ? {children} : children}
- //
- //
- //
- // )
+ return (
+
+
+
+
+ {data.session ? {children} : children}
+
+
+
+ )
}
diff --git a/chatdesk-ui/pages/_document.tsx b/chatdesk-ui/pages/_document.tsx
new file mode 100644
index 0000000..bff7227
--- /dev/null
+++ b/chatdesk-ui/pages/_document.tsx
@@ -0,0 +1,23 @@
+/*
+ eslint-disable @next/next/no-sync-scripts
+
+ ⛔ 请勿删除:
+ 我们在此处强制同步加载 /env.js 用于注入 window.RUNTIME_ENV,
+ 以确保运行时 Supabase 等动态配置在 React 启动前就可用。
+*/
+import { Html, Head, Main, NextScript } from "next/document";
+
+export default function Document() {
+ return (
+
+
+ {/* 使用 defer 确保 env.js 加载顺序 */}
+
+
+
+
+
+
+
+ );
+}