languageReducer.js 334 Bytes
Newer Older
Giang Tran committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
import {CHANGE_LANGUAGE} from './../actions/actionTypes';

var initialState = {
  language: 'vi',
};

var languageReducer = (state = initialState, action) => {
  switch (action.type) {
    case CHANGE_LANGUAGE: {
      return {language: action.language};
    }
    default:
      return state;
  }
};

export default languageReducer;