member_webapp/@overflow/member/store/container/signout/member-signout.reducer.ts
crusader 1d0ac6b572 ing
2018-05-28 16:51:33 +09:00

45 lines
818 B
TypeScript

import {
Actions as MemberActions,
ActionType as MemberActionType,
} from '../../entity/member/member.action';
import {
State,
initialState,
} from './member-signout.state';
import {
Actions as AuthActions,
ActionType as AuthActionType,
} from '@overflow/shared/auth/store/container/auth';
export function reducer(state = initialState, action: MemberActions | AuthActions): State {
switch (action.type) {
case MemberActionType.Signout: {
return {
pending: true,
error: null,
};
}
case AuthActionType.SignoutSuccess: {
return {
pending: false,
error: null,
};
}
case AuthActionType.SignoutFailure: {
return {
pending: false,
error: null,
};
}
default: {
return state;
}
}
}