diff --git a/mon-entreprise/source/components/layout/Footer/Footer.tsx b/mon-entreprise/source/components/layout/Footer/Footer.tsx index 1cd0da9b1..49727e297 100644 --- a/mon-entreprise/source/components/layout/Footer/Footer.tsx +++ b/mon-entreprise/source/components/layout/Footer/Footer.tsx @@ -39,14 +39,16 @@ export default function Footer() { const sitePaths = useContext(SitePathsContext) const showFeedback = useShowFeedback() const language = useTranslation().i18n.language as 'fr' | 'en' - const hrefLink = - hrefLangLink[language][ - decodeURIComponent( - (process.env.NODE_ENV === 'production' - ? window.location.protocol + '//' + window.location.host - : '') + window.location.pathname - ).replace(/\/$/, '') - ] || [] + + const encodedUri = + (process.env.NODE_ENV === 'production' || + process.env.NODE_ENV === 'development' + ? window.location.protocol + '//' + window.location.host + : '') + window.location.pathname + const uri = decodeURIComponent(encodedUri).replace(/\/$/, '') + + const hrefLink = hrefLangLink[language][uri] || [] + return (