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

@@ -3,8 +3,12 @@ import "./profileLayout.css"
import { serverClient } from "@/lib/trpc/server"
import TrackingSDK from "@/components/TrackingSDK"
import { setLang } from "@/i18n/serverContext"
export default async function ProfilePage() {
import { LangParams, PageArgs } from "@/types/params"
export default async function ProfilePage({ params }: PageArgs<LangParams>) {
setLang(params.lang)
const accountPage = await serverClient().contentstack.accountPage.get()
if (!accountPage) {