Update setFilterEdge references in code
This commit is contained in:
parent
59de3fe50b
commit
cbea369c2c
7 changed files with 12 additions and 10 deletions
|
|
@ -71,7 +71,7 @@ export default function ParameterComponent({
|
|||
|
||||
const groupedEdge = useRef(null);
|
||||
|
||||
const setFilterEdge = useTypesStore((state) => state.setFilterEdge);
|
||||
const setFilterEdge = useFlowStore((state) => state.setFilterEdge);
|
||||
|
||||
let disabled =
|
||||
edges.some(
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default function Page({
|
|||
);
|
||||
const types = useTypesStore((state) => state.types);
|
||||
const templates = useTypesStore((state) => state.templates);
|
||||
const setFilterEdge = useTypesStore((state) => state.setFilterEdge);
|
||||
const setFilterEdge = useFlowStore((state) => state.setFilterEdge);
|
||||
const reactFlowWrapper = useRef<HTMLDivElement>(null);
|
||||
|
||||
const reactFlowInstance = useFlowStore((state) => state.reactFlowInstance);
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ import SidebarDraggableComponent from "./sideBarDraggableComponent";
|
|||
export default function ExtraSidebar(): JSX.Element {
|
||||
const data = useTypesStore((state) => state.data);
|
||||
const templates = useTypesStore((state) => state.templates);
|
||||
const getFilterEdge = useTypesStore((state) => state.getFilterEdge);
|
||||
const setFilterEdge = useTypesStore((state) => state.setFilterEdge);
|
||||
const getFilterEdge = useFlowStore((state) => state.getFilterEdge);
|
||||
const setFilterEdge = useFlowStore((state) => state.setFilterEdge);
|
||||
const uploadFlow = useFlowsManagerStore((state) => state.uploadFlow);
|
||||
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
||||
const hasStore = useStoreStore((state) => state.hasStore);
|
||||
|
|
|
|||
|
|
@ -257,8 +257,13 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
|||
flowState: undefined,
|
||||
sseData: {},
|
||||
isBuilt: false,
|
||||
getFilterEdge: [],
|
||||
});
|
||||
},
|
||||
setFilterEdge: (newState) => {
|
||||
set({ getFilterEdge: newState });
|
||||
},
|
||||
getFilterEdge: []
|
||||
}));
|
||||
|
||||
export default useFlowStore;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ export const useTypesStore = create<TypesStoreType>((set, get) => ({
|
|||
types: {},
|
||||
templates: {},
|
||||
data: {},
|
||||
getFilterEdge: [],
|
||||
getTypes: () => {
|
||||
return new Promise<void>(async (resolve, reject) => {
|
||||
getAll()
|
||||
|
|
@ -44,7 +43,5 @@ export const useTypesStore = create<TypesStoreType>((set, get) => ({
|
|||
let newChange = typeof change === "function" ? change(get().data) : change;
|
||||
set({ data: newChange });
|
||||
},
|
||||
setFilterEdge: (newState) => {
|
||||
set({ getFilterEdge: newState });
|
||||
},
|
||||
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -50,4 +50,6 @@ export type FlowStoreType = {
|
|||
isBuilt: boolean;
|
||||
setIsBuilt: (isBuilt: boolean) => void;
|
||||
cleanFlow: () => void;
|
||||
setFilterEdge: (newState) => void;
|
||||
getFilterEdge: any[];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,6 +8,4 @@ export type TypesStoreType = {
|
|||
data: APIDataType;
|
||||
setData: (newState: {}) => void;
|
||||
getTypes: () => Promise<void>;
|
||||
setFilterEdge: (newState) => void;
|
||||
getFilterEdge: any[];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue