Fix lang switch

pull/2692/head
Jérémy Rialland 2023-06-14 13:00:39 +02:00 committed by Jérémy Rialland
parent 97c97fe9a6
commit e9a8c69acd
1 changed files with 4 additions and 5 deletions

View File

@ -29,11 +29,10 @@ export default function Footer() {
const path = pathname.replace(/^\/(mon-entreprise|infrance)/, '')
const altLang = language === 'en' ? 'fr' : 'en'
const altHref =
(import.meta.env.DEV && typeof window !== 'undefined'
? language === 'en'
? '/mon-entreprise'
: '/infrance'
: '') + altPathname[language][path] ?? altPathname[language][path + '/']
(language === 'en'
? import.meta.env.VITE_FR_BASE_URL
: import.meta.env.VITE_EN_BASE_URL) + altPathname[language][path] ??
altPathname[language][path + '/']
const isFrenchMode = language === 'fr'