Files
Go-To-bed/src/app/store/gotobed.reducer.ts
2021-12-16 23:58:01 +01:00

14 lines
468 B
TypeScript

import { EGotobedActions, GotobedActions } from "./gotobed.actions";
import { GotobedState, initialGotoBedState } from "./gotobed.state";
export function gotobedReducer(state = initialGotoBedState, action: GotobedActions): GotobedState {
switch (action.type) {
case EGotobedActions.SendCommandChanged:
return {
...state,
command: action.payload,
};
default:
return state;
}
}