diff --git a/src/renderer/components/modal/modal.tsx b/src/renderer/components/modal/modal.tsx index cc75db26..f2575e1f 100644 --- a/src/renderer/components/modal/modal.tsx +++ b/src/renderer/components/modal/modal.tsx @@ -57,7 +57,7 @@ export function Modal({ window.addEventListener("keydown", onKeyDown); return () => window.removeEventListener("keydown", onKeyDown); - }, []); + }, [handleCloseClick]); useEffect(() => { const onMouseDown = (e: MouseEvent) => { @@ -74,7 +74,7 @@ export function Modal({ window.addEventListener("mousedown", onMouseDown); return () => window.removeEventListener("mousedown", onMouseDown); - }, []); + }, [handleCloseClick]); useEffect(() => { dispatch(toggleDragging(visible));