You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reducer.ts 505B

123456789101112131415161718192021222324
  1. import ReducerRegistry from '../redux/ReducerRegistry';
  2. import { SET_AUDIO_ONLY } from './actionTypes';
  3. export interface IAudioOnlyState {
  4. enabled: boolean
  5. }
  6. const DEFAULT_STATE = {
  7. enabled: false
  8. };
  9. ReducerRegistry.register('features/base/audio-only', (state: IAudioOnlyState = DEFAULT_STATE, action) => {
  10. switch (action.type) {
  11. case SET_AUDIO_ONLY:
  12. return {
  13. ...state,
  14. enabled: action.audioOnly
  15. };
  16. default:
  17. return state;
  18. }
  19. });