diff options
Diffstat (limited to 'src/background/reducers/index.js')
-rw-r--r-- | src/background/reducers/index.js | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/background/reducers/index.js b/src/background/reducers/index.js index 78f855c..465f927 100644 --- a/src/background/reducers/index.js +++ b/src/background/reducers/index.js @@ -1,17 +1,8 @@ -import settingReducer from './setting'; -import findReducer from './find'; -import tabReducer from './tab'; +import { combineReducers } from 'redux'; +import setting from './setting'; +import find from './find'; +import tab from './tab'; -// Make setting reducer instead of re-use -const defaultState = { - setting: settingReducer(undefined, {}), - find: findReducer(undefined, {}), - tab: tabReducer(undefined, {}), -}; - -export default function reducer(state = defaultState, action = {}) { - return { ...state, - setting: settingReducer(state.setting, action), - find: findReducer(state.find, action), - tab: tabReducer(state.tab, action), }; -} +export default combineReducers({ + setting, find, tab, +}); |