feat(SW-187): Fixed LanguageSwitcher for footer

This commit is contained in:
Pontus Dreij
2024-09-05 14:30:33 +02:00
parent 2a59ad431b
commit de94510068
14 changed files with 139 additions and 54 deletions

View File

@@ -24,6 +24,7 @@ export default function LanguageSwitcherContent({
const { toggleLanguageSwitcher } = useDropdownStore()
const languageSwitcherRef = useTrapFocus()
const urlKeys = Object.keys(urls) as Lang[]
const position = type === "footer" ? "footer" : "header"
return (
<div className={styles.languageSwitcherContent} ref={languageSwitcherRef}>
@@ -32,7 +33,7 @@ export default function LanguageSwitcherContent({
<button
type="button"
className={styles.backButton}
onClick={toggleLanguageSwitcher}
onClick={() => toggleLanguageSwitcher(position)}
>
<ChevronLeftIcon color="red" />
<Subtitle type="one">Main Menu</Subtitle>