aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/index.js
blob: 17c0429d1007ca448ddce6f36714860fe205d64c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import addonReducer from './addon';
import settingReducer from './setting';
import inputReducer from './input';
import followControllerReducer from './follow-controller';

// Make setting reducer instead of re-use
const defaultState = {
  addon: addonReducer(undefined, {}),
  setting: settingReducer(undefined, {}),
  input: inputReducer(undefined, {}),
  followController: followControllerReducer(undefined, {}),
};

export default function reducer(state = defaultState, action = {}) {
  return Object.assign({}, state, {
    addon: addonReducer(state.addon, action),
    setting: settingReducer(state.setting, action),
    input: inputReducer(state.input, action),
    followController: followControllerReducer(state.followController, action),
  });
}