31 lines
843 B
TypeScript
31 lines
843 B
TypeScript
import "@/app/globals.css"
|
|
import "@scandic-hotels/design-system/style.css"
|
|
|
|
import TrpcProvider from "@/lib/trpc/Provider"
|
|
|
|
import InitLivePreview from "@/components/LivePreview"
|
|
import { getIntl } from "@/i18n"
|
|
import ServerIntlProvider from "@/i18n/Provider"
|
|
import { setLang } from "@/i18n/serverContext"
|
|
|
|
import type { LangParams, LayoutArgs } from "@/types/params"
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
params,
|
|
}: React.PropsWithChildren<LayoutArgs<LangParams>>) {
|
|
setLang(params.lang)
|
|
const { defaultLocale, locale, messages } = await getIntl()
|
|
|
|
return (
|
|
<html lang={params.lang}>
|
|
<body>
|
|
<InitLivePreview />
|
|
<ServerIntlProvider intl={{ defaultLocale, locale, messages }}>
|
|
<TrpcProvider>{children}</TrpcProvider>
|
|
</ServerIntlProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|