enable/disable addon by keys

This commit is contained in:
Shin'ya Ueoka 2017-10-21 19:40:22 +09:00
parent 59f7ef205d
commit dc6d93c1da
4 changed files with 27 additions and 0 deletions

View file

@ -1,14 +1,17 @@
import addonReducer from './addon';
import inputReducer from './input';
import followReducer from './follow';
// Make setting reducer instead of re-use
const defaultState = {
addon: addonReducer(undefined, {}),
input: inputReducer(undefined, {}),
follow: followReducer(undefined, {}),
};
export default function reducer(state = defaultState, action = {}) {
return Object.assign({}, state, {
addon: addonReducer(state.addon, action),
input: inputReducer(state.input, action),
follow: followReducer(state.follow, action),
});