feat(SW-1842): Making the language switcher links render in the initial HTML for SEO purposes, should also fix SW-1991 and SW-1742.

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-03-24 14:12:48 +00:00
parent f633ad7fcc
commit 34bc877092
6 changed files with 83 additions and 70 deletions

View File

@@ -1,6 +1,6 @@
"use client"
import { FocusTrap } from "focus-trap-react"
import FocusLock from "react-focus-lock"
import useDropdownStore from "@/stores/main-menu"
@@ -34,10 +34,7 @@ export default function MegaMenu({
}
return (
<FocusTrap
active={isOpen}
focusTrapOptions={{ clickOutsideDeactivates: true }}
>
<FocusLock disabled={!isOpen} returnFocus={true}>
<nav className={`${styles.megaMenu} ${isOpen ? styles.active : ""}`}>
{isMobile ? (
<div className={styles.backWrapper}>
@@ -122,6 +119,6 @@ export default function MegaMenu({
) : null}
</div>
</nav>
</FocusTrap>
</FocusLock>
)
}