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

12 lines
281 B
JavaScript
Raw Normal View History

2017-08-25 22:07:37 +08:00
import { SHOW_LEAVE_TEAM_MODAL } from "../../app/action_types";
2017-08-25 14:54:32 +08:00
2017-08-25 22:07:37 +08:00
export function showLeaveTeamModal(
2017-09-01 23:10:43 +08:00
state = { show: false, team: { id: 0, name: "" } },
2017-08-25 22:07:37 +08:00
action
) {
if (action.type === SHOW_LEAVE_TEAM_MODAL) {
return { ...state, ...action.payload };
2017-08-25 14:54:32 +08:00
}
2017-08-25 22:07:37 +08:00
return state;
2017-08-25 14:54:32 +08:00
}