fix: update condition in useEffect to properly handle modal open state

This commit is contained in:
Bob Qiu committed 2026-10-16 15:46:02 +08:00
1 parent 2385fe5f67
commit 7743b293d4
1 file changed
+1 -1
@@ -40,7 +40,7 @@ export const ProjectModal = ({
}, [isOpen]);
useEffect(() => {
if (activeNavigation && activeNavigation.state !== 'idle' && activeNavigation.location && isOpen) {
if (isOpen && location.pathname !== openedAtPathRef.current) {
onOpenChange(false);
}
}, [location, isOpen, onOpenChange]);