import { NextIntlClientProvider } from 'next-intl'; import { notFound } from 'next/navigation'; import type { Metadata } from 'next'; export const metadata: Metadata = { title: 'Judge4C', description: 'Online Judge System', }; export function generateStaticParams() { return [{ locale: 'en' }, { locale: 'zh' }]; } export default async function LocaleLayout({ children, params }: { children: React.ReactNode; params: { locale: string }; }) { const { locale } = await params; let messages; try { messages = (await import(`../../../messages/${locale}.json`)).default; } catch (error) { notFound(); } return ( {children} ); }