Personal Dashboard

user.js 321B

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