fix: minor pages ui (#700)

This commit is contained in:
Aaryan Khandelwal 2023-04-04 18:31:28 +05:30 committed by GitHub
parent 7f7ceec24c
commit 0036ac6afb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 28 deletions

View file

@ -148,15 +148,15 @@ export const CreateUpdateBlockInline: React.FC<Props> = ({
useEffect(() => {
window.addEventListener("keydown", (e: KeyboardEvent) => {
if (e.key === "Escape") onClose();
if (e.key === "Escape") handleClose();
});
return () => {
window.removeEventListener("keydown", (e: KeyboardEvent) => {
if (e.key === "Escape") onClose();
if (e.key === "Escape") handleClose();
});
};
}, [onClose]);
}, [handleClose]);
return (
<div className="border rounded-[10px] p-2 ml-6">