forked from github/plane
chore: esc to close peek overview added (#3380)
This commit is contained in:
parent
5625a3581a
commit
8c89e9cc01
@ -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 && (
|
||||
|
Loading…
Reference in New Issue
Block a user