diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-09 17:35:10 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 17:35:10 +0900 |
commit | 447466808f484d4baa6b285f2dbcaf1920db5498 (patch) | |
tree | aba110eb78b4ce3eb6cefb8100f167e17a23fcc3 /src/content/reducers | |
parent | 892eb8a6a6d9080213f461f19a8b8435a6482237 (diff) | |
parent | 805d1395fc869235f079438b5b4884a521c0230e (diff) |
Merge pull request #27 from ueokande/react-settings
Use React in settings
Diffstat (limited to 'src/content/reducers')
-rw-r--r-- | src/content/reducers/index.js | 3 | ||||
-rw-r--r-- | src/content/reducers/input.js | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/content/reducers/index.js b/src/content/reducers/index.js index a62217f..c026a19 100644 --- a/src/content/reducers/index.js +++ b/src/content/reducers/index.js @@ -1,18 +1,15 @@ -import settingReducer from 'settings/reducers/setting'; import inputReducer from './input'; import followReducer from './follow'; // Make setting reducer instead of re-use const defaultState = { input: inputReducer(undefined, {}), - setting: settingReducer(undefined, {}), follow: followReducer(undefined, {}), }; export default function reducer(state = defaultState, action = {}) { return Object.assign({}, state, { input: inputReducer(state.input, action), - setting: settingReducer(state.setting, action), follow: followReducer(state.follow, action), }); } diff --git a/src/content/reducers/input.js b/src/content/reducers/input.js index 802020f..c79b206 100644 --- a/src/content/reducers/input.js +++ b/src/content/reducers/input.js @@ -2,6 +2,7 @@ import actions from 'content/actions'; const defaultState = { keys: '', + keymaps: {}, }; export default function reducer(state = defaultState, action = {}) { @@ -14,6 +15,10 @@ export default function reducer(state = defaultState, action = {}) { return Object.assign({}, state, { keys: '', }); + case actions.INPUT_SET_KEYMAPS: + return Object.assign({}, state, { + keymaps: action.keymaps, + }); default: return state; } |