Files
web/app/[lang]/webview/layout.tsx
2024-07-05 14:25:35 +02:00

34 lines
873 B
TypeScript

import "@/app/globals.css"
import "@scandic-hotels/design-system/style.css"
import TrpcProvider from "@/lib/trpc/Provider"
import { getIntl } from "@/i18n"
import ServerIntlProvider from "@/i18n/Provider"
import styles from "./layout.module.css"
import type { Metadata } from "next"
import type { LangParams, LayoutArgs } from "@/types/params"
export const metadata: Metadata = {
title: "Webview",
}
export default async function RootLayout({
children,
params,
}: React.PropsWithChildren<LayoutArgs<LangParams>>) {
const { defaultLocale, locale, messages } = await getIntl()
return (
<html lang={params.lang}>
<body className={styles.layout}>
<ServerIntlProvider intl={{ defaultLocale, locale, messages }}>
<TrpcProvider lang={params.lang}>{children}</TrpcProvider>
</ServerIntlProvider>
</body>
</html>
)
}