From ca7193476d54eb4835d7d14e23250f23b1204383 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 4 Jan 2024 18:51:32 -0300 Subject: [PATCH] chore(flowManagerStore.ts): add isPending property to RFState to track pending state chore(tabs/index.ts): keep existing properties and functions in FlowsContextType for future use --- src/frontend/src/stores/flowManagerStore.ts | 2 ++ src/frontend/src/types/tabs/index.ts | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/frontend/src/stores/flowManagerStore.ts b/src/frontend/src/stores/flowManagerStore.ts index ee2bd172d..6aba64e2a 100644 --- a/src/frontend/src/stores/flowManagerStore.ts +++ b/src/frontend/src/stores/flowManagerStore.ts @@ -31,6 +31,7 @@ type RFState = { lastCopiedSelection: { nodes: any; edges: any }; nodeId: string; incrementNodeId: () => void; + isPending: boolean; }; // this is our useStore hook that we can use in our components to get parts of the store and call actions @@ -71,6 +72,7 @@ const useStore = create((set, get) => ({ incrementNodeId: () => { set((state) => ({ nodeId: uid() })); }, + isPending: false, })); export default useStore; diff --git a/src/frontend/src/types/tabs/index.ts b/src/frontend/src/types/tabs/index.ts index 0e03e6b73..68f7447e7 100644 --- a/src/frontend/src/types/tabs/index.ts +++ b/src/frontend/src/types/tabs/index.ts @@ -5,14 +5,19 @@ import { FlowType, NodeDataType } from "../flow"; type OnChange = (changes: ChangesType[]) => void; export type FlowsContextType = { + //keep saveFlow: (flow?: FlowType, silent?: boolean) => Promise; tabId: string; + //keep isLoading: boolean; setTabId: (index: string) => void; + //keep flows: Array; deleteNode: (idx: string | Array) => void; deleteEdge: (idx: string | Array) => void; + //keep removeFlow: (id: string) => void; + //keep addFlow: ( newProject: boolean, flow?: FlowType, @@ -25,7 +30,9 @@ export type FlowsContextType = { flowName: string, flowDescription?: string ) => void; + //keep downloadFlows: () => void; + //keep uploadFlows: () => void; isBuilt: boolean; setIsBuilt: (state: boolean) => void;