14 lines
468 B
TypeScript
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;
|
|
}
|
|
} |