index reducer in background
This commit is contained in:
parent
fc90f78e26
commit
157ebaef9c
3 changed files with 18 additions and 12 deletions
12
src/background/reducers/index.js
Normal file
12
src/background/reducers/index.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import settingReducer from 'settings/reducers/setting';
|
||||
|
||||
// Make setting reducer instead of re-use
|
||||
const defaultState = {
|
||||
setting: settingReducer(undefined, {}),
|
||||
};
|
||||
|
||||
export default function reducer(state = defaultState, action = {}) {
|
||||
return Object.assign({}, state, {
|
||||
setting: settingReducer(state.setting, action),
|
||||
});
|
||||
}
|
Reference in a new issue