mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
fix: add handleCloseClick to useEffect dependency
This commit is contained in:
parent
376c0810cd
commit
08fbaf7b59
@ -57,7 +57,7 @@ export function Modal({
|
|||||||
|
|
||||||
window.addEventListener("keydown", onKeyDown);
|
window.addEventListener("keydown", onKeyDown);
|
||||||
return () => window.removeEventListener("keydown", onKeyDown);
|
return () => window.removeEventListener("keydown", onKeyDown);
|
||||||
}, []);
|
}, [handleCloseClick]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const onMouseDown = (e: MouseEvent) => {
|
const onMouseDown = (e: MouseEvent) => {
|
||||||
@ -74,7 +74,7 @@ export function Modal({
|
|||||||
|
|
||||||
window.addEventListener("mousedown", onMouseDown);
|
window.addEventListener("mousedown", onMouseDown);
|
||||||
return () => window.removeEventListener("mousedown", onMouseDown);
|
return () => window.removeEventListener("mousedown", onMouseDown);
|
||||||
}, []);
|
}, [handleCloseClick]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
dispatch(toggleDragging(visible));
|
dispatch(toggleDragging(visible));
|
||||||
|
Loading…
Reference in New Issue
Block a user