feat(ui): use pubsub to for globalcontextmenuclose

Far more efficient than the crude redux incrementor thing.
This commit is contained in:
psychedelicious
2023-12-30 23:53:55 +11:00
committed by Kent Keirsey
parent bd92a31d15
commit 2ba505cce9
7 changed files with 37 additions and 32 deletions

View File

@@ -22,11 +22,12 @@ const WorkflowLibraryMenu = () => {
const { t } = useTranslation();
const { isOpen, onOpen, onClose } = useDisclosure();
useGlobalMenuCloseTrigger(onClose);
const isWorkflowLibraryEnabled =
useFeatureStatus('workflowLibrary').isFeatureEnabled;
return (
<InvMenu isOpen={isOpen} onOpen={onOpen} onClose={onClose}>
<InvMenu isOpen={isOpen} onOpen={onOpen} onClose={onClose} isLazy>
<InvMenuButton
as={InvIconButton}
aria-label={t('workflows.workflowEditorMenu')}