34 lines
838 B
TypeScript
Executable File
34 lines
838 B
TypeScript
Executable File
import '@nice/ui/styles/globals.css';
|
||
import './globals.css';
|
||
import type { Metadata } from 'next';
|
||
import { I18N_CONFIG } from '@nice/i18n';
|
||
import AppProvider from '@/components/providers/app-provider';
|
||
|
||
export const metadata: Metadata = {
|
||
title: 'Fenghuo',
|
||
description: 'A modern web application with i18n support',
|
||
};
|
||
|
||
// 获取默认语言
|
||
function getDefaultLocale() {
|
||
return I18N_CONFIG.defaultLocale;
|
||
}
|
||
|
||
export default async function RootLayout({
|
||
children,
|
||
}: Readonly<{
|
||
children: React.ReactNode;
|
||
}>) {
|
||
|
||
// 使用默认语言作为fallback,实际语言由 [locale] 布局处理
|
||
const defaultLang = getDefaultLocale();
|
||
|
||
return (
|
||
<html lang={defaultLang} suppressHydrationWarning>
|
||
<body className="font-sans antialiased" suppressHydrationWarning>
|
||
<AppProvider>{children}</AppProvider>
|
||
</body>
|
||
</html>
|
||
);
|
||
}
|