import type { Metadata } from 'next'; import { hasLocale, NextIntlClientProvider } from 'next-intl'; import { getMessages, getTranslations } from 'next-intl/server'; import { notFound } from 'next/navigation'; import { siteUrl } from '#web-runtime/lib/site-url'; import { routing } from '#i18n/routing'; import '../globals.css'; export async function generateMetadata({ params }: { params: Promise<{ locale: string }>; }): Promise { const { locale } = await params; const t = await getTranslations({ locale, namespace: 'Metadata' }); return { metadataBase: siteUrl(), title: { default: t('title'), template: t('template') }, description: t('description') }; } export default async function LocaleLayout({ children, params }: Readonly<{ children: React.ReactNode; params: Promise<{ locale: string }>; }>) { const { locale } = await params; if (!hasLocale(routing.locales, locale)) { notFound(); } const messages = await getMessages(); return ( {children} ); }