fix: close navmenu on navigation

This commit is contained in:
2026-10-07 18:16:29 +02:00
parent 2d06447811
commit 9ba0c59eff
@@ -153,6 +153,8 @@ export function DesktopNav({
useEffect(() => clearCloseTimer, [clearCloseTimer]);
useEffect(() => closeGroup(), [pathname, closeGroup]);
const columnLinks = useCallback((groupId: string): HTMLElement[] => {
const nav = navRef.current;
if (!nav) return [];
@@ -490,6 +492,7 @@ export function DesktopNav({
<Link
to={child.href}
data-nav-sublink=""
onClick={closeGroup}
aria-current={
isCurrentPath(child.href, pathname) ? "page" : undefined
}
@@ -520,6 +523,7 @@ export function DesktopNav({
isCurrentPath(item.href, pathname) ? "page" : undefined
}
onFocus={closeGroup}
onClick={closeGroup}
className={cx(
"body-sm-bold whitespace-nowrap pb-[2px] no-underline",
/* Same rest/hover/current treatment as a group trigger. */