Files
jitsi-meet/react/features/noise-suppression/reducer.ts
Robert Pintilii 10bb186c13 ref(eslint) Use new TypeScript ESlint config (#12143)
Use new TS config from @jitsi/eslint
Fix all lint errors
2022-09-08 12:52:36 +03:00

32 lines
679 B
TypeScript

import ReducerRegistry from '../base/redux/ReducerRegistry';
import {
SET_NOISE_SUPPRESSION_ENABLED
} from './actionTypes';
export interface INoiseSuppressionState {
enabled: boolean;
}
const DEFAULT_STATE = {
enabled: false
};
/**
* Reduces the Redux actions of the feature features/noise-suppression.
*/
ReducerRegistry.register<INoiseSuppressionState>('features/noise-suppression',
(state = DEFAULT_STATE, action): INoiseSuppressionState => {
const { enabled } = action;
switch (action.type) {
case SET_NOISE_SUPPRESSION_ENABLED:
return {
...state,
enabled
};
default:
return state;
}
});