chore: esc to close peek overview added (#3380)
This commit is contained in:
parent
5625a3581a
commit
8c89e9cc01
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue