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