From f035be88e458625fe313b4bf5342939ed10efc68 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira Date: Mon, 10 Jul 2023 15:59:38 -0300 Subject: [PATCH] Fixed bug where we cannot create new flow when we build a flow --- .../src/components/chatComponent/index.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 829dd5b13..58c058866 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -72,7 +72,7 @@ export default function Chat({ flow }: ChatType) { } prevNodesRef.current = currentNodes; - }, [tabsState]); + }, [tabsState, flow.id]); return ( <> @@ -83,9 +83,17 @@ export default function Chat({ flow }: ChatType) { setIsBuilt={setIsBuilt} isBuilt={isBuilt} /> - {isBuilt && canOpen && ( - - )} + {isBuilt && + tabsState[flow.id] && + tabsState[flow.id].formKeysData && + canOpen && ( + + )}