Fixes undo/redo

This commit is contained in:
psychedelicious 2022-11-12 22:02:47 +11:00 committed by blessedcoolant
parent d5467e7db5
commit 3f1360368d
2 changed files with 6 additions and 6 deletions

View File

@ -35,12 +35,12 @@ export default function IAICanvasRedoButton() {
useHotkeys(
['meta+shift+z', 'control+shift+z', 'control+y', 'meta+y'],
(e: KeyboardEvent) => {
e.preventDefault();
() => {
handleRedo();
},
{
enabled: canRedo,
enabled: () => canRedo,
preventDefault: true,
},
[activeTabName, canRedo]
);

View File

@ -36,12 +36,12 @@ export default function IAICanvasUndoButton() {
useHotkeys(
['meta+z', 'control+z'],
(e: KeyboardEvent) => {
e.preventDefault();
() => {
handleUndo();
},
{
enabled: canUndo,
enabled: () => canUndo,
preventDefault: true,
},
[activeTabName, canUndo]
);