From ac04a834efa6899effafff5abd232ac039e65ff8 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Thu, 4 Jan 2024 23:00:15 +1100 Subject: [PATCH] feat(ui): tidy hotkeysmodal state --- .../components/HotkeysModal/HotkeysModal.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx index b0ca291cbb..ec810bb54a 100644 --- a/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx +++ b/invokeai/frontend/web/src/features/system/components/HotkeysModal/HotkeysModal.tsx @@ -41,11 +41,7 @@ type HotkeysModalProps = { }; const HotkeysModal = ({ children }: HotkeysModalProps) => { - const { - isOpen: isHotkeyModalOpen, - onOpen: onHotkeysModalOpen, - onClose: onHotkeysModalClose, - } = useDisclosure(); + const { isOpen, onOpen, onClose } = useDisclosure(); const { t } = useTranslation(); const [hotkeyFilter, setHotkeyFilter] = useState(''); const clearHotkeyFilter = useCallback(() => setHotkeyFilter(''), []); @@ -88,14 +84,9 @@ const HotkeysModal = ({ children }: HotkeysModalProps) => { return ( <> {cloneElement(children, { - onClick: onHotkeysModalOpen, + onClick: onOpen, })} - + {t('hotkeys.keyboardShortcuts')}