diff --git a/src/lib/Nav.svelte b/src/lib/Nav.svelte index b995039..9190e94 100644 --- a/src/lib/Nav.svelte +++ b/src/lib/Nav.svelte @@ -3,6 +3,7 @@ import UserProfile from './UserProfile.svelte'; import Logo from './Logo.svelte'; import { onMount, onDestroy } from 'svelte'; + import { afterNavigate } from '$app/navigation'; let isResourcesOpen = false; let isMenuOpen = false; @@ -47,15 +48,14 @@ }; }); + // close the resources dropdown on every navigation + afterNavigate(() => (isResourcesOpen = false)); -
- - - - {#if isMenuOpen} -
-
-