scinote-web/app/javascript/packs/shared/reducers/TeamReducers.js

9 lines
245 B
JavaScript
Raw Normal View History

2017-08-02 23:27:05 +08:00
import { SET_CURRENT_TEAM } from '../actions/types';
export const setCurrentTeam = (state = {}, action) => {
if (action.type === SET_CURRENT_TEAM) {
return Object.assign({}, state, { currentTeam: action.payload });
}
return state;
};