35 lines
912 B
TypeScript
35 lines
912 B
TypeScript
import type {Metadata} from 'next'
|
|
import {headers} from 'next/headers'
|
|
import {ReactNode} from 'react'
|
|
import {Toaster} from 'react-hot-toast'
|
|
|
|
import './globals.css'
|
|
//import {Toaster} from '@/components/ui/toaster'
|
|
import {routing} from '@/i18n/routing'
|
|
import {APP_DESCRIPTION, APP_NAME, APP_SLOGAN} from '@/lib/constants'
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
template: `%s | ${APP_NAME}`,
|
|
default: `${APP_NAME}. ${APP_SLOGAN}`
|
|
},
|
|
description: APP_DESCRIPTION
|
|
}
|
|
|
|
export default async function RootLayout({
|
|
children
|
|
}: Readonly<{children: ReactNode}>) {
|
|
const headersList = await headers()
|
|
const locale = headersList.get('x-site-locale') ?? routing.defaultLocale
|
|
|
|
return (
|
|
<html lang={locale} suppressHydrationWarning>
|
|
<body className='min-h-screen antialiased'>
|
|
{children}
|
|
{/*<Toaster />*/}
|
|
<Toaster position='top-right' reverseOrder={false} />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|