bigbuffet-rw/app/gabsocial/reducers/me.js

16 lines
368 B
JavaScript
Raw Normal View History

2020-04-02 12:28:19 -07:00
import { ME_FETCH_SUCCESS, ME_FETCH_FAIL } from '../actions/me';
import { Map as ImmutableMap, fromJS } from 'immutable';
2020-04-02 12:28:19 -07:00
const initialState = null;
export default function me(state = initialState, action) {
switch(action.type) {
case ME_FETCH_SUCCESS:
return fromJS(action.me.id);
2020-04-02 12:28:19 -07:00
case ME_FETCH_FAIL:
return false;
default:
return state;
}
};