65 lines
1.2 KiB
TypeScript
65 lines
1.2 KiB
TypeScript
import {
|
|
Actions,
|
|
ActionType,
|
|
} from './notification.action';
|
|
|
|
import {
|
|
State,
|
|
initialState,
|
|
notificationAdapter
|
|
} from './notification.state';
|
|
|
|
export function reducer(state = initialState, action: Actions): State {
|
|
switch (action.type) {
|
|
// case ActionType.ReadAllByMember: {
|
|
// return {
|
|
// ...state,
|
|
// error: null,
|
|
// };
|
|
// }
|
|
|
|
// case ActionType.ReadAllByMemberSuccess: {
|
|
// return {
|
|
// ...state,
|
|
// error: null,
|
|
// page: action.payload,
|
|
// };
|
|
// }
|
|
|
|
// case ActionType.ReadAllByMemberFailure: {
|
|
// return {
|
|
// ...state,
|
|
// error: action.payload,
|
|
// page: null,
|
|
// };
|
|
// }
|
|
|
|
// case ActionType.MarkAllAsRead: {
|
|
// return {
|
|
// ...state,
|
|
// error: null,
|
|
// };
|
|
// }
|
|
|
|
// case ActionType.MarkAllAsReadSuccess: {
|
|
// return {
|
|
// ...state,
|
|
// error: null,
|
|
// page: action.payload,
|
|
// };
|
|
// }
|
|
|
|
// case ActionType.MarkAllAsReadFailure: {
|
|
// return {
|
|
// ...state,
|
|
// error: action.payload,
|
|
// page: null,
|
|
// };
|
|
// }
|
|
|
|
default: {
|
|
return state;
|
|
}
|
|
}
|
|
}
|