14 lines
326 B
JavaScript
14 lines
326 B
JavaScript
import { handleActions } from 'redux-actions';
|
|
import actions from '../actions/user';
|
|
|
|
export default handleActions(
|
|
{
|
|
[actions.login]: (state, action) => {
|
|
return { ...state, ...action.payload };
|
|
},
|
|
[actions.logout]: (state, action) => {
|
|
return { ...state, ...action.payload };
|
|
},
|
|
},
|
|
{},
|
|
);
|