member_webapp/@overflow/member/store/container/signup/signup.reducer.ts

36 lines
551 B
TypeScript
Raw Normal View History

2018-05-28 05:41:56 +00:00
import {
Actions,
ActionType,
} from '../../entity/member/member.action';
import {
State,
initialState,
} from './signup.state';
export function reducer(state = initialState, action: Actions): State {
switch (action.type) {
case ActionType.Signup: {
return {
pending: true,
};
}
case ActionType.SignupSuccess: {
return {
pending: false,
};
}
case ActionType.SignupFailure: {
return {
pending: false,
};
}
default: {
return state;
}
}
}