Remove unused revertAllVerticesToBuild function

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-25 18:55:51 -03:00
commit 6d48479066
2 changed files with 1 additions and 13 deletions

View file

@ -416,7 +416,6 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
useFlowStore.getState().updateBuildStatus(idList, BuildStatus.BUILDING);
},
});
get().revertAllVerticesToBuild();
},
getFlow: () => {
return {
@ -429,17 +428,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
set({ verticesBuild: vertices });
},
verticesBuild: [],
revertAllVerticesToBuild: () => {
// set all vertices to TO_BUILD
let verticesIds: string[] = [];
Object.keys(get().buildStatus).forEach((id) => {
if (get().buildStatus[id] !== BuildStatus.TO_BUILD) {
verticesIds.push(id);
}
});
get().updateBuildStatus(verticesIds, BuildStatus.TO_BUILD);
// additional code logic here
},
removeFromVerticesBuild: (vertices: string[]) => {
set({
verticesBuild: get().verticesBuild.filter(

View file

@ -88,7 +88,6 @@ export type FlowStoreType = {
getFlow: () => { nodes: Node[]; edges: Edge[]; viewport: Viewport };
updateVerticesBuild: (vertices: string[]) => void;
removeFromVerticesBuild: (vertices: string[]) => void;
revertAllVerticesToBuild: () => void;
verticesBuild: string[];
updateBuildStatus: (nodeId: string[], status: BuildStatus) => void;
buildStatus: { [key: string]: BuildStatus };