Merge branch 'main' of https://git.nianxx.cn/wangxuming/NianAIGC
# Conflicts: # app/layout.tsx
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user