fix: update useEffect dependency to location.key so drawer gets closed also when retriggering navigation to the same path

This commit is contained in:
giacomocerquone 2025-09-07 20:13:59 +02:00
parent 3be1b3a1e3
commit 5d54d33f9d
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ const NavigationDrawer = observer(() => {
useEffect(() => { useEffect(() => {
setOpen(false); setOpen(false);
}, [location.pathname]); }, [location.key]);
return ( return (
<Sheet open={open} onOpenChange={setOpen}> <Sheet open={open} onOpenChange={setOpen}>