22 lines
559 B
TypeScript
22 lines
559 B
TypeScript
|
import { ActionType, Actions } from './noauth-probe-connecting.action';
|
||
|
import {
|
||
|
State,
|
||
|
initialState,
|
||
|
noAuthProbeConnectingAdapter,
|
||
|
} from './noauth-probe-connecting.state';
|
||
|
|
||
|
export function reducer(state = initialState, action: Actions): State {
|
||
|
switch (action.type) {
|
||
|
case ActionType.OnConnect: {
|
||
|
return noAuthProbeConnectingAdapter.upsertOne(action.payload, state);
|
||
|
}
|
||
|
case ActionType.OnDisconnect: {
|
||
|
return noAuthProbeConnectingAdapter.upsertOne(action.payload, state);
|
||
|
}
|
||
|
|
||
|
default: {
|
||
|
return state;
|
||
|
}
|
||
|
}
|
||
|
}
|