Merged in chore/upgrade-next (pull request #3124)
Upgrade next@15.5.6 * chore: upgrade next@15.5.6 * chore: upgrade turborepo@2.6.1 * fix typings for scandic-web * fix: set correct type for pages * cleanup * fix more route.ts typing issues * Merge branch 'master' of bitbucket.org:scandic-swap/web into chore/upgrade-next * explicitly import the types Approved-by: Linus Flood
This commit is contained in:
@@ -25,20 +25,18 @@ import { getMessages } from "@/i18n"
|
||||
import ClientIntlProvider from "@/i18n/Provider"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
import type { LayoutProps } from "@/.next/types/app/[lang]/(no-layout)/layout"
|
||||
|
||||
export default async function RootLayout(
|
||||
props: React.PropsWithChildren<LayoutArgs<LangParams>>
|
||||
) {
|
||||
export default async function RootLayout(props: LayoutProps) {
|
||||
const params = await props.params
|
||||
|
||||
const { children } = props
|
||||
|
||||
setLang(params.lang)
|
||||
const messages = await getMessages(params.lang)
|
||||
const lang = params.lang as Lang
|
||||
setLang(lang)
|
||||
const messages = await getMessages(lang)
|
||||
|
||||
return (
|
||||
<html lang={params.lang}>
|
||||
<html lang={lang}>
|
||||
<head>
|
||||
<AdobeSDKScript />
|
||||
<GTMScript />
|
||||
@@ -52,7 +50,7 @@ export default async function RootLayout(
|
||||
<SessionProvider basePath="/api/web/auth">
|
||||
<ClientIntlProvider
|
||||
defaultLocale={Lang.en}
|
||||
locale={params.lang}
|
||||
locale={lang}
|
||||
messages={messages}
|
||||
>
|
||||
<NuqsAdapter>
|
||||
|
||||
Reference in New Issue
Block a user