Skip to content

Commit

Permalink
refactor: removed escape keydown listener (#1814)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakshesh14 committed Aug 9, 2023
1 parent 4fcd081 commit 1991e09
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions apps/app/components/issues/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,6 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
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;

Expand Down

0 comments on commit 1991e09

Please sign in to comment.