29 lines
871 B
TypeScript
29 lines
871 B
TypeScript
import { cn } from '@/lib/utils';
|
|
import { NextIntlClientProvider } from 'next-intl';
|
|
import { getLocale, getMessages } from 'next-intl/server';
|
|
import './globals.css';
|
|
import { Inter } from 'next/font/google';
|
|
|
|
const inter = Inter({ subsets: ['latin', 'cyrillic'] });
|
|
|
|
export default async function RootLayout({ children }: { readonly children: React.ReactNode }) {
|
|
const locale = await getLocale();
|
|
|
|
// Providing all messages to the client
|
|
// side is the easiest way to get started
|
|
const messages = await getMessages();
|
|
|
|
return (
|
|
<html lang={locale}>
|
|
<body
|
|
className={cn(
|
|
inter.className,
|
|
'mx-auto min-h-screen max-w-2xl bg-background px-6 py-12 antialiased sm:py-24 bg-gray-100',
|
|
)}
|
|
>
|
|
<NextIntlClientProvider messages={messages}>{children}</NextIntlClientProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|