casualroom/apps/fenghuo/web/app/layout.tsx

34 lines
838 B
TypeScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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>
);
}