diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-14 22:11:54 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-14 22:11:54 +0900 |
commit | 157ebaef9c386175f84332bab003ec9d53ef3bac (patch) | |
tree | 0b8ea018ae2bf5592ccdc30ce82610ae91d2ad17 /src/background/reducers | |
parent | fc90f78e26dcf9531ec3702f99a3a45fd8cd4a18 (diff) |
index reducer in background
Diffstat (limited to 'src/background/reducers')
-rw-r--r-- | src/background/reducers/index.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/background/reducers/index.js b/src/background/reducers/index.js new file mode 100644 index 0000000..4be8fac --- /dev/null +++ b/src/background/reducers/index.js @@ -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), + }); +} |