Files
NianAIGC/app/layout.tsx

28 lines
962 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 = {
title: "智念AIGC平台",
description: "智念AIGC平台统一创作图片与视频。"
};
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const auth = await getShellAuthState();
return (
<html lang="zh-CN">
<body>
<Script
id="random-uuid-polyfill"
strategy="beforeInteractive"
dangerouslySetInnerHTML={{ __html: randomUUIDPolyfillScript }}
/>
<AppShell user={auth.user} authRequired={auth.authRequired} isAdmin={auth.isAdmin} isSuperAdmin={auth.isSuperAdmin}>{children}</AppShell>
</body>
</html>
);
}