- Cleanup

This commit is contained in:
2019-08-06 01:36:08 -04:00
parent 6e71ac688a
commit b8ddc54b99
43 changed files with 361 additions and 170 deletions

View File

@@ -1,14 +1,20 @@
import { Map } from 'immutable';
import {
LOGIN_SUCCESS,
SET_PROFILE,
UNSET_PROFILE,
UPDATE_PROFILE,
} from '../constants/actionTypes.js';
export const profile = (state = new Map(), action) => {
switch (action.type) {
case LOGIN_SUCCESS:
return action.payload.user;
case SET_PROFILE:
return action.payload;
case UNSET_PROFILE:
return new Map();
case UPDATE_PROFILE:
return action.payload;
default: