mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-08 11:06:37 +08:00
65 lines
1.9 KiB
TypeScript
65 lines
1.9 KiB
TypeScript
/* eslint-disable @next/next/no-page-custom-font */
|
|
import "./styles/globals.scss";
|
|
import "./styles/markdown.scss";
|
|
import "./styles/highlight.scss";
|
|
import { getServerSession } from "next-auth";
|
|
import SessionProvider from "./components/session-provider";
|
|
|
|
import { getClientConfig } from "./config/client";
|
|
import type { Metadata, Viewport } from "next";
|
|
import { SpeedInsights } from "@vercel/speed-insights/next";
|
|
import { getServerSideConfig } from "./config/server";
|
|
import { GoogleTagManager } from "@next/third-parties/google";
|
|
const serverConfig = getServerSideConfig();
|
|
|
|
export const metadata: Metadata = {
|
|
title: "AdExGPT Web",
|
|
description: "Our AdExGPT assistant - powered by Gen AI.",
|
|
viewport: {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
},
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#fafafa" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#151515" },
|
|
],
|
|
appleWebApp: {
|
|
title: "AdExGPT App iOS",
|
|
statusBarStyle: "default",
|
|
},
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const session = await getServerSession();
|
|
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="config" content={JSON.stringify(getClientConfig())} />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<link rel="manifest" href="/site.webmanifest"></link>
|
|
<script src="/serviceWorkerRegister.js" defer></script>
|
|
<script src="/redirect.js" defer></script>
|
|
</head>
|
|
<body>
|
|
<SessionProvider session={session}>{children}</SessionProvider>
|
|
{serverConfig?.isVercel && (
|
|
<>
|
|
<SpeedInsights />
|
|
</>
|
|
)}
|
|
{serverConfig?.gtmId && (
|
|
<>
|
|
<GoogleTagManager gtmId={serverConfig.gtmId} />
|
|
</>
|
|
)}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|