fix(seo): pass lang as a prop to Header/LanguageSwitcher instead of useParams

Since the vite-react-ssg migration replaced the dynamic /:lang route param
with literal /fr and /en routes, useParams().lang always returned undefined
here, breaking the header brand link (linked to /undefined/) and silently
breaking the language switcher (always resolved otherLang to 'fr').
This commit is contained in:
2026-08-02 10:58:23 +02:00
parent 74c676df9f
commit 6fc3386965
3 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export function LangLayout({ lang }) {
return (
<>
<Header theme={theme} onToggleTheme={toggleTheme} />
<Header lang={lang} theme={theme} onToggleTheme={toggleTheme} />
<main>
<Outlet />
</main>