added admin layout
This commit is contained in:
@@ -4,6 +4,8 @@ import { ReactElement } from 'react'
|
||||
import { I18nProviderClient } from '@/locales/client'
|
||||
import { lc } from '@/lib/utils'
|
||||
import './globals.css'
|
||||
import { SessionProvider } from 'next-auth/react'
|
||||
import { auth } from '@/config/auth'
|
||||
|
||||
const inter = Inter({ subsets: ['cyrillic'] })
|
||||
|
||||
@@ -15,13 +17,16 @@ type RootLayoutProps = {
|
||||
params: { locale: string }; children: ReactElement;
|
||||
}
|
||||
|
||||
export default function RootLayout ({ params: { locale }, children }: Readonly<RootLayoutProps>) {
|
||||
export default async function RootLayout ({ params: { locale }, children }: Readonly<RootLayoutProps>) {
|
||||
const session = await auth()
|
||||
|
||||
return (<html lang={lc(locale)?.java}>
|
||||
<body className={inter.className}>
|
||||
<I18nProviderClient locale={locale} fallback="Loading...">
|
||||
{children}
|
||||
</I18nProviderClient>
|
||||
</body>
|
||||
</html>)
|
||||
return (<SessionProvider session={session}>
|
||||
<html lang={lc(locale)?.java}>
|
||||
<body className={inter.className}>
|
||||
<I18nProviderClient locale={locale} fallback="Loading...">
|
||||
{children}
|
||||
</I18nProviderClient>
|
||||
</body>
|
||||
</html>
|
||||
</SessionProvider>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user