mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
setting nodes on flow\
This commit is contained in:
parent
4a7fe884f9
commit
4c49ed000a
4 changed files with 16 additions and 9 deletions
|
@ -1,15 +1,17 @@
|
|||
import { createReducer } from '~/utils/reducer';
|
||||
import { INode, UUID } from '../types';
|
||||
import { INode, IError } from '../types';
|
||||
import { FLOW_HANDLERS } from './handlers';
|
||||
|
||||
export type IFlowState = Readonly<{
|
||||
is_loading: boolean;
|
||||
nodes: Record<UUID, INode>;
|
||||
nodes: INode[];
|
||||
error: IError;
|
||||
}>;
|
||||
|
||||
const INITIAL_STATE: IFlowState = {
|
||||
nodes: {},
|
||||
nodes: [],
|
||||
is_loading: false,
|
||||
error: null,
|
||||
};
|
||||
|
||||
export default createReducer(INITIAL_STATE, FLOW_HANDLERS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue