43 lines
966 B
TypeScript
43 lines
966 B
TypeScript
import { Geist, Geist_Mono } from 'next/font/google';
|
|
import './globals.css';
|
|
import { Navbar } from '@/components/Navbar';
|
|
import { I18nProviderClient } from '@/locales/client';
|
|
import { Toaster } from '@/components/ui/sonner';
|
|
import type { Viewport } from 'next';
|
|
|
|
export const viewport: Viewport = {
|
|
width: 'device-width',
|
|
initialScale: 1,
|
|
viewportFit: 'cover',
|
|
};
|
|
|
|
const geistSans = Geist({
|
|
variable: '--font-geist-sans',
|
|
subsets: ['latin'],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: '--font-geist-mono',
|
|
subsets: ['latin'],
|
|
});
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="zh">
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
|
>
|
|
<I18nProviderClient locale="zh">
|
|
<Navbar />
|
|
<main>{children}</main>
|
|
</I18nProviderClient>
|
|
<Toaster />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|