Merged in feature/refactor-lang (pull request #387)

feat: SW-238 Avoid prop drilling of lang

Approved-by: Michael Zetterberg
This commit is contained in:
Niclas Edenvin
2024-08-14 11:00:20 +00:00
parent 35128dbf44
commit e67212bd94
94 changed files with 378 additions and 322 deletions

View File

@@ -1,4 +1,5 @@
import InitLivePreview from "@/components/Current/LivePreview"
import { getLang, setLang } from "@/i18n/serverContext"
import type { Metadata } from "next"
@@ -13,8 +14,10 @@ export default function RootLayout({
children,
params,
}: React.PropsWithChildren<LayoutArgs<LangParams>>) {
setLang(params.lang)
return (
<html lang={params.lang}>
<html lang={getLang()}>
<body>
<InitLivePreview />
{children}