mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
flow redux
This commit is contained in:
parent
9691504af6
commit
95443635b4
11 changed files with 118 additions and 10 deletions
15
src/redux/flow/reducer.ts
Normal file
15
src/redux/flow/reducer.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { createReducer } from '~/utils/reducer';
|
||||
import { INode, UUID } from '../types';
|
||||
import { FLOW_HANDLERS } from './handlers';
|
||||
|
||||
export type IFlowState = Readonly<{
|
||||
is_loading: boolean;
|
||||
nodes: Record<UUID, INode>;
|
||||
}>;
|
||||
|
||||
const INITIAL_STATE: IFlowState = {
|
||||
nodes: {},
|
||||
is_loading: false,
|
||||
};
|
||||
|
||||
export default createReducer(INITIAL_STATE, FLOW_HANDLERS);
|
Loading…
Add table
Add a link
Reference in a new issue