From 31f89283b48b41cd80572f00c20a30af09b6be1f Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 27 Nov 2023 18:43:46 -0300 Subject: [PATCH] fix(extraSidebarComponent): add validApiKey to the dependency array of ModalMemo to update the disabled state of the Share button based on validApiKey value fix(extraSidebarComponent): update the disabled state of the Share button to also consider validApiKey value fix(nodeToolbarComponent): add validApiKey to the dependency array of ModalMemo to update the disabled state of the Share SelectItem based on validApiKey value fix(nodeToolbarComponent): update the disabled state of the Share SelectItem to also consider validApiKey value fix(applies.css): remove unnecessary whitespace in the class definition of extra-side-bar-buttons --- .../extraSidebarComponent/index.tsx | 13 ++++----- .../components/nodeToolbarComponent/index.tsx | 29 +++++++++---------- src/frontend/src/style/applies.css | 2 +- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx index a3187c751..d5ce13dd8 100644 --- a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx @@ -30,7 +30,7 @@ export default function ExtraSidebar(): JSX.Element { useContext(typesContext); const { flows, tabId, uploadFlow, tabsState, saveFlow, isBuilt, version } = useContext(FlowsContext); - const { hasApiKey } = useContext(StoreContext); + const { hasApiKey,validApiKey } = useContext(StoreContext); const { setErrorData } = useContext(alertContext); const [dataFilter, setFilterData] = useState(data); const [search, setSearch] = useState(""); @@ -182,15 +182,15 @@ export default function ExtraSidebar(): JSX.Element { const ModalMemo = useMemo( () => ( - + -
- -
+
), - [hasApiKey] + [hasApiKey,validApiKey] ); const ExportMemo = useMemo( @@ -198,7 +198,6 @@ export default function ExtraSidebar(): JSX.Element {