add global find keyword

This commit is contained in:
Shin'ya Ueoka 2018-03-07 20:54:28 +09:00
parent 4923cb20c7
commit 24e72aa6e0
8 changed files with 74 additions and 0 deletions

View file

@ -1,12 +1,15 @@
import settingReducer from './setting';
import findReducer from './find';
// Make setting reducer instead of re-use
const defaultState = {
setting: settingReducer(undefined, {}),
find: findReducer(undefined, {}),
};
export default function reducer(state = defaultState, action = {}) {
return Object.assign({}, state, {
setting: settingReducer(state.setting, action),
find: findReducer(state.find, action),
});
}