lbry-desktop/ui/js/reducers/settings.js
2017-05-17 17:52:45 -04:00

17 lines
417 B
JavaScript

import * as types from 'constants/action_types'
const reducers = {}
const defaultState = {}
reducers[types.DAEMON_SETTINGS_RECEIVED] = function(state, action) {
return Object.assign({}, state, {
daemonSettings: action.data.settings
})
}
export default function reducer(state = defaultState, action) {
const handler = reducers[action.type];
if (handler) return handler(state, action);
return state;
}