UNPKG

contiago-toolbar

Version:

One of the options for outputting content from contiago xml-server

31 lines (25 loc) 495 B
/* * * LanguageProvider reducer * */ import { fromJS } from 'immutable'; import { CHANGE_LOCALE, } from './constants'; import { DEFAULT_LOCALE, } from '../App/constants'; const initialState = fromJS({ locale: DEFAULT_LOCALE, }); function languageProviderReducer(state = initialState, action) { switch (action.type) { case CHANGE_LOCALE: return state .set('locale', action.locale); default: return state; } } export default languageProviderReducer;