export default {

  namespace: 'userInfo',

  state: {
    userName: undefined,
    currentJiDiName: undefined,
    jidiList: [],
    language: '',
  },
  subscriptions: {
    setup({ dispatch }) {  // eslint-disable-line
    },
  },
  reducers: {
    setlanguage(state, { payload: language }) {
      return {
        ...state,
        language,
      };
    },
    setUserName(state, { payload: userName }) {
      return {
        ...state,
        userName,
      };
    },
    setJiDiList(state, { payload: jidiList }) {
      return {
        ...state,
        jidiList,
      };
    },
    setCurrentJiDi(state, { payload: currentJiDiName }) {
      return {
        ...state,
        currentJiDiName,
      };
    },
  },
  effects: {
  },
};
