# Conflicts:
#	app/layout.tsx
This commit is contained in:
brother7 committed 2026-05-29 17:13:47 +08:00
commit 1e032637de
50 files changed
+1853 -63

No files matched your search

+4 -2
View File
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
import Script from "next/script";
import { AppShell } from "@/components/app-shell";
import { randomUUIDPolyfillScript } from "@/lib/client/random-uuid-polyfill";
import { getShellAuthState } from "@/lib/server/auth/current-user";
import "./globals.css";
export const metadata: Metadata = {
@@ -9,7 +10,8 @@ export const metadata: Metadata = {
description: "智念AIGC平台:统一创作图片、视频、局部重绘与智能超清。"
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const auth = await getShellAuthState();
return (
<html lang="zh-CN">
<body>
@@ -18,7 +20,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
strategy="beforeInteractive"
dangerouslySetInnerHTML={{ __html: randomUUIDPolyfillScript }}
/>
<AppShell>{children}</AppShell>
<AppShell user={auth.user} authRequired={auth.authRequired}>{children}</AppShell>
</body>
</html>
);