feat: rename function

This commit is contained in:
Fernando Zanutto 2024-04-23 15:47:34 -03:00
parent c6facbe253
commit 840e45033c

View File

@ -59,7 +59,7 @@ export function Modal({
}, []);
useEffect(() => {
const onMouseUp = (e: MouseEvent) => {
const onMouseDown = (e: MouseEvent) => {
if (!isTopMostModal()) return;
const modalContent = document.getElementById(
@ -73,8 +73,8 @@ export function Modal({
}
};
window.addEventListener("mousedown", onMouseUp);
return () => window.removeEventListener("mousedown", onMouseUp);
window.addEventListener("mousedown", onMouseDown);
return () => window.removeEventListener("mousedown", onMouseDown);
}, []);
useEffect(() => {