yo-next-auth/app/[locale]/layout.tsx

33 lines
860 B
TypeScript

import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import { ReactElement } from 'react'
import { I18nProviderClient } from '@/locales/client'
import { lc } from '@/lib/utils'
import { Loading } from '@/components/loading'
const inter = Inter({ subsets: ['cyrillic'] })
export const metadata: Metadata = {
title: 'Create Next App', description: 'Generated by create next app',
}
type Props = {
params: { locale: string }; children: ReactElement;
}
export default function RootLayout ({
params: { locale }, children,
}: Readonly<Props>) {
return (<html lang={lc(locale)?.java}>
{/*<Suspense fallback={<Loading/>}>*/}
<body className={inter.className}>
<I18nProviderClient locale={locale} fallback={<Loading/>}>
{children}
</I18nProviderClient>
</body>
{/*</Suspense>*/}
</html>)
}