mirror of https://github.com/usememos/memos.git
fix: update useEffect dependency to location.key so drawer gets closed also when retriggering navigation to the same path
This commit is contained in:
parent
3be1b3a1e3
commit
5d54d33f9d
|
|
@ -16,7 +16,7 @@ const NavigationDrawer = observer(() => {
|
|||
|
||||
useEffect(() => {
|
||||
setOpen(false);
|
||||
}, [location.pathname]);
|
||||
}, [location.key]);
|
||||
|
||||
return (
|
||||
<Sheet open={open} onOpenChange={setOpen}>
|
||||
|
|
|
|||
Loading…
Reference in New Issue