| 1 |
/** |
| 2 |
* Internal dependencies |
| 3 |
*/ |
| 4 |
import { DEFAULT_STATE } from './'; |
| 5 |
|
| 6 |
const reducer = ( state = DEFAULT_STATE, action ) => { |
| 7 |
switch ( action.type ) { |
| 8 |
case 'SET_IS_REGENERATING_AUDIO': |
| 9 |
return { |
| 10 |
...state, |
| 11 |
isRegeneratingAudio: action.value, |
| 12 |
}; |
| 13 |
case 'SET_LANGUAGES': |
| 14 |
return { |
| 15 |
...state, |
| 16 |
languages: action.value, |
| 17 |
}; |
| 18 |
case 'SET_PLAYER_STYLES': |
| 19 |
return { |
| 20 |
...state, |
| 21 |
playerStyles: action.value, |
| 22 |
}; |
| 23 |
case 'SET_SETTINGS': |
| 24 |
return { |
| 25 |
...state, |
| 26 |
settings: action.value, |
| 27 |
}; |
| 28 |
case 'SET_VOICES': |
| 29 |
return { |
| 30 |
...state, |
| 31 |
voices: action.value, |
| 32 |
}; |
| 33 |
} |
| 34 |
|
| 35 |
return state; |
| 36 |
}; |
| 37 |
|
| 38 |
export default reducer; |
| 39 |
|