import { NavigationActions } from 'react-navigation';
import { getData, getMeta } from '../../utils/DataTemplate';

export default {

  namespace: 'userInfo',

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