From 7f993ea908cb6cba5ea43d33a1be8a60b68588f6 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Tue, 2 May 2023 19:54:05 -0300 Subject: [PATCH] fixed outside click on alert popup --- .../components/tabsManagerComponent/index.tsx | 181 +++++++++--------- 1 file changed, 93 insertions(+), 88 deletions(-) diff --git a/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx index 6f9773a51..7a7526906 100644 --- a/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/tabsManagerComponent/index.tsx @@ -5,11 +5,11 @@ import { TabsContext } from "../../../../contexts/tabsContext"; import FlowPage from "../.."; import { darkContext } from "../../../../contexts/darkContext"; import { - ArrowDownTrayIcon, - ArrowUpTrayIcon, - BellIcon, - MoonIcon, - SunIcon, + ArrowDownTrayIcon, + ArrowUpTrayIcon, + BellIcon, + MoonIcon, + SunIcon, } from "@heroicons/react/24/outline"; import { PopUpContext } from "../../../../contexts/popUpContext"; import AlertDropdown from "../../../../alerts/alertDropDown"; @@ -22,96 +22,101 @@ export default function TabsManagerComponent() { const { flows, addFlow, tabIndex, setTabIndex, uploadFlow, downloadFlow } = useContext(TabsContext); const { openPopUp } = useContext(PopUpContext); - const {templates} = useContext(typesContext) + const { templates } = useContext(typesContext); const AlertWidth = 256; const { dark, setDark } = useContext(darkContext); const { notificationCenter, setNotificationCenter } = useContext(alertContext); useEffect(() => { //create the first flow - if (flows.length === 0&& Object.keys(templates).length>0) { + if (flows.length === 0 && Object.keys(templates).length > 0) { addFlow(); } - }, [addFlow, flows.length,templates]); + }, [addFlow, flows.length, templates]); - return ( -
-
- {flows.map((flow, index) => { - return ( - setTabIndex(index)} - selected={index === tabIndex} - key={index} - flow={flow} - /> - ); - })} - { - addFlow(); - }} - selected={false} - flow={null} - /> -
- - - - -
-
-
- - {flows[tabIndex] ? ( - - ) : ( - <> - )} - -
-
- ); + return ( +
+
+ {flows.map((flow, index) => { + return ( + setTabIndex(index)} + selected={index === tabIndex} + key={index} + flow={flow} + /> + ); + })} + { + addFlow(); + }} + selected={false} + flow={null} + /> +
+ + + + +
+
+
+ + {flows[tabIndex] ? ( + + ) : ( + <> + )} + +
+
+ ); }