's'
This commit is contained in:
62
app/layout.tsx
Normal file
62
app/layout.tsx
Normal file
@@ -0,0 +1,62 @@
|
||||
import "@/styles/globals.css"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { ThemeProvider } from "@/components/theme-provider"
|
||||
import { Toaster } from "@/components/ui/toaster"
|
||||
import { ThemeToggle } from '@/components/theme-toggle'
|
||||
import { Providers } from '@/components/providers'
|
||||
import type { Metadata } from 'next'
|
||||
import Script from 'next/script'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
default: 'NavSphere',
|
||||
template: '%s - NavSphere'
|
||||
},
|
||||
description: 'A modern navigation platform',
|
||||
icons: {
|
||||
icon: '/favicon.ico'
|
||||
}
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<html lang="zh-CN" suppressHydrationWarning>
|
||||
<head>
|
||||
{/* Google Analytics */}
|
||||
<Script
|
||||
strategy="afterInteractive"
|
||||
src="https://www.googletagmanager.com/gtag/js?id=G-QG9PGG4K13"
|
||||
/>
|
||||
<Script
|
||||
id="google-analytics"
|
||||
strategy="afterInteractive"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'G-QG9PGG4K13');
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<body suppressHydrationWarning>
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<Providers>
|
||||
{children}
|
||||
</Providers>
|
||||
<Toaster />
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user