1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-26 05:16:41 +07:00

removed lab reducer

This commit is contained in:
Fedor Katurov 2022-01-05 15:57:29 +07:00
parent e24ea4afeb
commit 2b7b756212
26 changed files with 242 additions and 369 deletions

22
src/store/lab/LabStore.ts Normal file
View file

@ -0,0 +1,22 @@
import { makeAutoObservable } from 'mobx';
import { IFlowNode, ITag } from '~/redux/types';
import { ILabNode } from '~/types/lab';
export class LabStore {
// actual nodes
nodes: ILabNode[] = [];
// stats
heroes: IFlowNode[] = [];
tags: ITag[] = [];
updates: IFlowNode[] = [];
constructor() {
makeAutoObservable(this);
}
setNodes = (nodes: ILabNode[]) => (this.nodes = nodes);
setHeroes = (heroes: IFlowNode[]) => (this.heroes = heroes);
setTags = (tags: ITag[]) => (this.tags = tags);
setUpdates = (updates: IFlowNode[]) => (this.updates = updates);
}

View file

@ -0,0 +1,3 @@
import { useStore } from '~/utils/context/StoreContextProvider';
export const useLabStore = () => useStore().lab;