fix: links issues, translations and layouts
This commit is contained in:
@@ -3,6 +3,9 @@ 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"
|
||||
@@ -13,14 +16,17 @@ export const metadata: Metadata = {
|
||||
title: "Webview",
|
||||
}
|
||||
|
||||
export default function RootLayout({
|
||||
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}>
|
||||
<TrpcProvider lang={params.lang}>{children}</TrpcProvider>
|
||||
<ServerIntlProvider intl={{ defaultLocale, locale, messages }}>
|
||||
<TrpcProvider lang={params.lang}>{children}</TrpcProvider>
|
||||
</ServerIntlProvider>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user