diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-04 22:01:16 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-04 22:01:16 +0900 |
commit | 79a4a805f6be14572b4486ddb79b0ebb98e37690 (patch) | |
tree | 839dea5d9ed0654693c307c72dc3c75ebbe12a86 /src/pages | |
parent | 6594841b1d1f082107bdb1489f02d3c99cff8ffa (diff) |
single reducer
Diffstat (limited to 'src/pages')
-rw-r--r-- | src/pages/console.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/pages/console.js b/src/pages/console.js index 4ce9e47..0e152d3 100644 --- a/src/pages/console.js +++ b/src/pages/console.js @@ -2,11 +2,11 @@ import './console.scss'; import messages from '../content/messages'; import CompletionComponent from '../components/completion'; import ConsoleComponent from '../components/console'; -import completionReducer from '../reducers/completion'; +import reducers from '../reducers'; import { createStore } from '../store'; import * as completionActions from '../actions/completion'; -const store = createStore(completionReducer); +const store = createStore(reducers); let completionComponent = null; let consoleComponent = null; let prevState = {}; @@ -15,14 +15,13 @@ window.addEventListener('load', () => { let wrapper = document.querySelector('#vimvixen-console-completion'); completionComponent = new CompletionComponent(wrapper, store); - // TODO use root root store instead of store consoleComponent = new ConsoleComponent(document.body, store); }); store.subscribe(() => { completionComponent.update(); - let state = store.getState(); + let state = store.getState().completion; if (state.groupSelection >= 0) { let item = state.groups[state.groupSelection].items[state.itemSelection]; |