Fix: Remove event listener through cleanup

This commit is contained in:
fyzanshaik 2024-07-29 18:59:26 +05:30
parent 1af0b7d967
commit 4a90134f34

View file

@ -146,8 +146,10 @@ export default function ContentApp({
return () => {
document.removeEventListener("mousemove", () => {});
document.removeEventListener('keydown', handleKeyDown, true);
};
}, []);
}, [isPopoverOpen]);
const getSpaces = async () => {
const response = await fetch(`${BACKEND_URL}/api/spaces`, {