Personal Dashboard

user.js 333B

12345678910
  1. import { handleActions } from 'redux-actions'
  2. import * as actions from '../Actions/user'
  3. const user = handleActions({
  4. [actions.LOGIN]: (state, action) => action.payload,
  5. [actions.LOGOUT]: (state, action) => null,
  6. [actions.CHANGE_PIC]: (state, action) => ({ ...state, photoURL: action.payload })
  7. }, null);
  8. export default user;