This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
Sphere/app/reducers/user.js

10 lines
260 B
JavaScript
Raw Permalink Normal View History

2016-04-28 17:34:20 +01:00
import * as actions from '../actions';
import { Map } from 'immutable';
export default function user(state = Map(), action) {
if (action.type === actions.LOGIN.SUCCESS) {
return Map(action.payload).set('token', action.meta.token);
}
return state;
}