fix: Move add node hotkey to the right component

This commit is contained in:
blessedcoolant 2023-08-22 23:42:51 +12:00 committed by psychedelicious
parent ce7172d78c
commit d4463674cf
2 changed files with 1 additions and 6 deletions

View File

@ -140,7 +140,7 @@ const AddNodePopover = () => {
onClose();
}, [onClose]);
useHotkeys(['space', '/'], handleHotkeyOpen);
useHotkeys(['shift+a', 'space', '/'], handleHotkeyOpen);
useHotkeys(['escape'], handleHotkeyClose);
return (

View File

@ -2,7 +2,6 @@ import { useAppDispatch } from 'app/store/storeHooks';
import IAIButton from 'common/components/IAIButton';
import { addNodePopoverOpened } from 'features/nodes/store/nodesSlice';
import { memo, useCallback } from 'react';
import { useHotkeys } from 'react-hotkeys-hook';
import { Panel } from 'reactflow';
const TopLeftPanel = () => {
@ -12,10 +11,6 @@ const TopLeftPanel = () => {
dispatch(addNodePopoverOpened());
}, [dispatch]);
useHotkeys(['shift+a'], () => {
handleOpenAddNodePopover();
});
return (
<Panel position="top-left">
<IAIButton aria-label="Add Node" onClick={handleOpenAddNodePopover}>