72 lines
1.6 KiB
TypeScript
72 lines
1.6 KiB
TypeScript
import type {Metadata} from 'next'
|
|
import localFont from 'next/font/local'
|
|
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
|
|
}
|
|
|
|
const Myriad = localFont({
|
|
variable: '--font-myriad',
|
|
src: [
|
|
/*{
|
|
path: '../public/fonts/myriad-light.woff2',
|
|
weight: '300',
|
|
style: 'normal'
|
|
},*/
|
|
{
|
|
path: '../public/fonts/myriad-regular.woff2',
|
|
weight: '400',
|
|
style: 'normal'
|
|
},
|
|
/*{
|
|
path: '../public/fonts/myriad-it.woff2',
|
|
weight: '400',
|
|
style: 'italic'
|
|
},*/
|
|
{
|
|
path: '../public/fonts/myriad-semibold.woff2',
|
|
weight: '600',
|
|
style: 'normal'
|
|
},
|
|
{
|
|
path: '../public/fonts/myriad-bold.woff2',
|
|
weight: '700',
|
|
style: 'normal'
|
|
}
|
|
/*{
|
|
path: '../public/fonts/myriad-boldit.woff2',
|
|
weight: '700',
|
|
style: 'italic'
|
|
}*/
|
|
]
|
|
})
|
|
|
|
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 className={Myriad.variable}>
|
|
<body className={`min-h-screen antialiased`}>
|
|
{children}
|
|
{/*<Toaster />*/}
|
|
<Toaster position='top-right' reverseOrder={false} />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|