1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-26 05:16:41 +07:00
vault-frontend/src/redux/flow/handlers.ts
2019-08-24 17:58:39 +07:00

11 lines
366 B
TypeScript

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,
};