From 0ad3cbeb0f4981b4f0abf8a791f340ea1fcbba8c Mon Sep 17 00:00:00 2001 From: bhushan6 Date: Tue, 15 Aug 2023 04:24:09 +0530 Subject: [PATCH] adds undo, redo shortcuts --- src/components/UI/BottomBar/index.jsx | 3 +++ src/utils/hooks.js | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/components/UI/BottomBar/index.jsx b/src/components/UI/BottomBar/index.jsx index 986ae9b..00fbde1 100644 --- a/src/components/UI/BottomBar/index.jsx +++ b/src/components/UI/BottomBar/index.jsx @@ -4,6 +4,7 @@ import { TrashIcon, ResetIcon } from "@radix-ui/react-icons"; import "./styles.css"; import { useStore } from "../../../store"; import { PopoverPeopleList } from "../PeopleList"; +import { useUndoRedoShortcut } from "../../../utils"; // import { EDIT_MODE } from "../../../utils"; export const BottomBar = () => { @@ -51,6 +52,8 @@ export const BottomBar = () => { setSelection({}); }; + useUndoRedoShortcut(undo, redo); + return (