diff --git a/src/app/(main)/layout.module.css b/src/app/(main)/[lang]/layout.module.css similarity index 100% rename from src/app/(main)/layout.module.css rename to src/app/(main)/[lang]/layout.module.css diff --git a/src/app/(main)/layout.tsx b/src/app/(main)/[lang]/layout.tsx similarity index 95% rename from src/app/(main)/layout.tsx rename to src/app/(main)/[lang]/layout.tsx index 1e54246fe..c33decf46 100644 --- a/src/app/(main)/layout.tsx +++ b/src/app/(main)/[lang]/layout.tsx @@ -26,8 +26,12 @@ const hasValidData = (data: unknown) => data && Object.keys(data).length > 0; export default async function Layout({ children, + params, }: Readonly<{ children: React.ReactNode; + params: { + lang: string; + }; }>) { const { perspective, isDraftMode } = getDraftModeInfo(); @@ -47,7 +51,7 @@ export default async function Layout({ ), loadStudioQuery( LEGAL_DOCUMENTS_BY_LANG_QUERY, - { language: "en" }, //TODO: replace this with selected language for the page + { language: params.lang }, { perspective }, ), loadStudioQuery(BRAND_ASSETS_QUERY, {}, { perspective }), @@ -90,6 +94,8 @@ export default async function Layout({ initialCompanyInfo={initialCompanyInfo} initialBrandAssets={initialBrandAssets} initialSoMe={initialSoMe} + initialLegal={initialLegal} + language={params.lang} /> ) : (