import { combineReducers } from 'redux' ; import { reducer as mobilizationReducer } from '../bonde-webpage' ; import { reducer as intlReducer } from './intlReducer' ; const LOAD_SOURCE_REQUEST = 'sourceRequest/LOAD_SOURCE_REQUEST' ; const sourceReqInitialState = { host : '' , protocol : '' , } ; export const sourceReqCreateReducer = ( initialState ) => ( state = initialState , action = { } ) => { switch ( action . type ) { case LOAD_SOURCE_REQUEST : return { ... state , ... action . payload } ; default : return state ; } } ; const createReducer = ( initialState = { } ) => combineReducers ( { intl : intlReducer , sourceRequest : sourceReqCreateReducer ( sourceReqInitialState ) , mobilizations : mobilizationReducer , ... initialState , } ) ; export default createReducer ;