16 lines
219 B
JavaScript
16 lines
219 B
JavaScript
|
|
function reducer( state = { scheme: '' }, action ) {
|
|
|
|
switch ( action.type ) {
|
|
case 'UPDATE_SCHEME':
|
|
return {
|
|
...state,
|
|
scheme: action.scheme,
|
|
};
|
|
// no default
|
|
}
|
|
return state;
|
|
}
|
|
|
|
export default reducer;
|