fix: broken language switch
Some checks failed
/ deploy (push) Failing after 1s

This commit is contained in:
Dariusz Niemczyk 2025-04-04 17:19:01 +02:00
parent bcc01476c3
commit 2a1fff4748
No known key found for this signature in database

View file

@ -15,7 +15,7 @@ export const LanguageSelector = () => {
}
const lang = params?.locale || 'pl';
const changedLang = pathname.replace(`/${lang}/`, `/${replacements[lang]}/`)
const changedLang = pathname.replace(`/${lang}`, `/${replacements[lang]}`)
if (lang === 'pl') return (<>
<Link suppressHydrationWarning className="pt-1" href={changedLang}>🇬🇧</Link></>);