import * as types from 'app/types' const initialState = { peaks: { loading: true }, text: { loading: true }, } export default function siteReducer(state = initialState, action) { // console.log(action.type, action) switch (action.type) { case types.peaks.loaded: return { ...state, peaks: action.data, } case types.text.loaded: return { ...state, text: action.data, } default: return state } }