From 1991e09035b225c7c76322c18437fed9f791e601 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain <65905942+dakshesh14@users.noreply.github.com> Date: Wed, 9 Aug 2023 15:18:26 +0530 Subject: [PATCH] refactor: removed escape keydown listener (#1814) --- apps/app/components/issues/modal.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/apps/app/components/issues/modal.tsx b/apps/app/components/issues/modal.tsx index 31cf44c19..5a66c98b8 100644 --- a/apps/app/components/issues/modal.tsx +++ b/apps/app/components/issues/modal.tsx @@ -125,19 +125,6 @@ export const CreateUpdateIssueModal: React.FC = ({ setActiveProject(projects?.find((p) => p.id === projectId)?.id ?? projects?.[0].id ?? null); }, [activeProject, data, projectId, projects, isOpen]); - useEffect(() => { - const handleKeyDown = (e: KeyboardEvent) => { - if (e.key === "Escape") { - onClose(); - } - }; - - window.addEventListener("keydown", handleKeyDown); - return () => { - window.removeEventListener("keydown", handleKeyDown); - }; - }, [onClose]); - const addIssueToCycle = async (issueId: string, cycleId: string) => { if (!workspaceSlug || !activeProject) return;