mirror of
				https://github.com/Yidadaa/ChatGPT-Next-Web.git
				synced 2025-10-31 21:59:19 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			53 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| /* eslint-disable @next/next/no-page-custom-font */
 | |
| import "./styles/globals.scss";
 | |
| import "./styles/markdown.scss";
 | |
| import "./styles/highlight.scss";
 | |
| import { getClientConfig } from "./config/client";
 | |
| import { type Metadata } from "next";
 | |
| import { SpeedInsights } from "@vercel/speed-insights/next";
 | |
| import { getServerSideConfig } from "./config/server";
 | |
| 
 | |
| const serverConfig = getServerSideConfig();
 | |
| 
 | |
| export const metadata: Metadata = {
 | |
|   title: "NextChat",
 | |
|   description: "Your personal ChatGPT Chat Bot.",
 | |
|   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: "NextChat",
 | |
|     statusBarStyle: "default",
 | |
|   },
 | |
| };
 | |
| 
 | |
| export default function RootLayout({
 | |
|   children,
 | |
| }: {
 | |
|   children: React.ReactNode;
 | |
| }) {
 | |
|   return (
 | |
|     <html lang="en">
 | |
|       <head>
 | |
|         <meta name="config" content={JSON.stringify(getClientConfig())} />
 | |
|         <link rel="manifest" href="/site.webmanifest"></link>
 | |
|         <script src="/serviceWorkerRegister.js" defer></script>
 | |
|       </head>
 | |
|       <body>
 | |
|         {children}
 | |
|         {serverConfig?.isVercel && (
 | |
|           <>
 | |
|             <SpeedInsights />
 | |
|           </>
 | |
|         )}
 | |
|       </body>
 | |
|     </html>
 | |
|   );
 | |
| }
 |