fix: update useEffect dependency to location.key so drawer is closed also when re-navigating to current route (#5077)

pull/5079/head
Giacomo Cerquone 1 month ago committed by GitHub
parent 3be1b3a1e3
commit 60123de318
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save