36 lines
551 B
TypeScript
36 lines
551 B
TypeScript
import {
|
|
Actions,
|
|
ActionType,
|
|
} from '../../entity/member/member.action';
|
|
|
|
import {
|
|
State,
|
|
initialState,
|
|
} from './modify.state';
|
|
|
|
export function reducer(state = initialState, action: Actions): State {
|
|
switch (action.type) {
|
|
case ActionType.Modify: {
|
|
return {
|
|
pending: true,
|
|
};
|
|
}
|
|
|
|
case ActionType.ModifySuccess: {
|
|
return {
|
|
pending: false,
|
|
};
|
|
}
|
|
|
|
case ActionType.ModifyFailure: {
|
|
return {
|
|
pending: false,
|
|
};
|
|
}
|
|
|
|
default: {
|
|
return state;
|
|
}
|
|
}
|
|
}
|