import { NextIntlClientProvider } from 'next-intl' import { getMessages } from 'next-intl/server' import { notFound } from 'next/navigation' import Link from 'next/link' import { locales } from '@/i18n' import Providers from './Providers' import Navbar from '@/components/nav/Navbar' interface LayoutProps { children: React.ReactNode params: { locale: string } } export default async function LocaleLayout({ children, params: { locale } }: LayoutProps) { if (!locales.includes(locale as (typeof locales)[number])) { notFound() } const messages = await getMessages() const href = (path: string) => `/${locale}${path}` return (
{children}
) }