fix: updated flow pages to just set the flow if types are fetched (#8141)

Updated flow pages to just upload flows if types are fetched
This commit is contained in:
Lucas Oliveira 2025-05-20 18:38:21 -03:00 committed by GitHub
commit 981081f3b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,7 +100,7 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element {
// Set flow tab id
useEffect(() => {
const awaitgetTypes = async () => {
if (flows && currentFlowId === "") {
if (flows && currentFlowId === "" && Object.keys(types).length > 0) {
const isAnExistingFlow = flows.find((flow) => flow.id === id);
if (!isAnExistingFlow) {
@ -114,7 +114,7 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element {
}
};
awaitgetTypes();
}, [id, flows, currentFlowId]);
}, [id, flows, currentFlowId, types]);
useEffect(() => {
setOnFlowPage(true);