2017-06-06 17:19:12 -04:00
|
|
|
import * as types from "constants/action_types";
|
2017-05-17 17:52:45 -04:00
|
|
|
|
2017-06-05 21:21:55 -07:00
|
|
|
const reducers = {};
|
|
|
|
const defaultState = {};
|
2017-05-17 17:52:45 -04:00
|
|
|
|
|
|
|
reducers[types.DAEMON_SETTINGS_RECEIVED] = function(state, action) {
|
|
|
|
return Object.assign({}, state, {
|
2017-06-06 17:19:12 -04:00
|
|
|
daemonSettings: action.data.settings,
|
|
|
|
});
|
2017-06-05 21:21:55 -07:00
|
|
|
};
|
2017-05-17 17:52:45 -04:00
|
|
|
|
|
|
|
export default function reducer(state = defaultState, action) {
|
|
|
|
const handler = reducers[action.type];
|
|
|
|
if (handler) return handler(state, action);
|
|
|
|
return state;
|
|
|
|
}
|