Created the base design
This commit is contained in:
14
src/app/store/gotobed.reducer.ts
Normal file
14
src/app/store/gotobed.reducer.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user