mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
flow redux
This commit is contained in:
parent
9691504af6
commit
95443635b4
11 changed files with 118 additions and 10 deletions
11
src/redux/flow/handlers.ts
Normal file
11
src/redux/flow/handlers.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import assocPath from 'ramda/es/assocPath';
|
||||
import { FLOW_ACTIONS } from './constants';
|
||||
import { flowSetNodes } from './actions';
|
||||
import { IFlowState } from './reducer';
|
||||
|
||||
const setNodes = (state: IFlowState, { nodes }: ReturnType<typeof flowSetNodes>) =>
|
||||
assocPath(['nodes'], nodes, state);
|
||||
|
||||
export const FLOW_HANDLERS = {
|
||||
[FLOW_ACTIONS.SET_NODES]: setNodes,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue