mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-28 14:16:41 +07:00
hero slider
This commit is contained in:
parent
a9da7e8cef
commit
5cd5941be0
12 changed files with 266 additions and 14 deletions
|
@ -1,11 +1,15 @@
|
|||
import assocPath from 'ramda/es/assocPath';
|
||||
import { FLOW_ACTIONS } from './constants';
|
||||
import { flowSetNodes } from './actions';
|
||||
import { flowSetNodes, flowSetHeroes } from './actions';
|
||||
import { IFlowState } from './reducer';
|
||||
|
||||
const setNodes = (state: IFlowState, { nodes }: ReturnType<typeof flowSetNodes>) =>
|
||||
assocPath(['nodes'], nodes, state);
|
||||
|
||||
const setHeroes = (state: IFlowState, { heroes }: ReturnType<typeof flowSetHeroes>) =>
|
||||
assocPath(['heroes'], heroes, state);
|
||||
|
||||
export const FLOW_HANDLERS = {
|
||||
[FLOW_ACTIONS.SET_NODES]: setNodes,
|
||||
[FLOW_ACTIONS.SET_HEROES]: setHeroes,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue