import { TPayloadAction , IRules } from '../types' ; import { merge } from 'ramda' ; const initialState = { racesAndAlignments : { tiefling : [ ] , human : [ ] , elf : [ ] } } ; export function rulesReducer ( state = initialState , action ) { switch ( action . type ) { case 'FETCH_RACES_ALIGNMENTS_COMPLETED' : return merge ( state , { racesAndAlignments : action . payload } ) ; default : return state ; } }