- Linting... Prettier...
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
import { Map } from 'immutable';
|
||||
|
||||
import {
|
||||
LOGIN_SUCCESS,
|
||||
SET_PROFILE,
|
||||
UNSET_PROFILE,
|
||||
UPDATE_PROFILE,
|
||||
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:
|
||||
return state;
|
||||
}
|
||||
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:
|
||||
return state;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user