chore: esc to close peek overview added (#3380)

This commit is contained in:
Anmol Singh Bhatia 2024-01-16 18:23:42 +05:30 committed by sriram veeraghanta
parent 5625a3581a
commit 8c89e9cc01

View File

@ -4,6 +4,7 @@ import { observer } from "mobx-react-lite";
import { MoveRight, MoveDiagonal, Link2, Trash2 } from "lucide-react";
// hooks
import useOutsideClickDetector from "hooks/use-outside-click-detector";
import useKeypress from "hooks/use-keypress";
// store hooks
import { useIssueDetail, useUser } from "hooks/store";
import useToast from "hooks/use-toast";
@ -99,6 +100,9 @@ export const IssueView: FC<IIssueView> = observer((props) => {
});
};
const handleKeyDown = () => !isAnyModalOpen && removeRoutePeekId();
useKeypress("Escape", handleKeyDown);
return (
<>
{issue && !is_archived && (