aboutsummaryrefslogtreecommitdiff
path: root/src/content/reducers/index.js
blob: 7cf318e1a247e6a438109b394a9aff779be9a404 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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),
  });
}