diff options
Diffstat (limited to 'packages/gitbook-plugin-search/src/index.js')
-rw-r--r-- | packages/gitbook-plugin-search/src/index.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/gitbook-plugin-search/src/index.js b/packages/gitbook-plugin-search/src/index.js index 94a5d35..c3b0253 100644 --- a/packages/gitbook-plugin-search/src/index.js +++ b/packages/gitbook-plugin-search/src/index.js @@ -3,11 +3,15 @@ const GitBook = require('gitbook-core'); const SearchInput = require('./components/Input'); const SearchResults = require('./components/Results'); const reducers = require('./reducers'); +const search = require('./actions/search'); -module.exports = GitBook.createPlugin( - (dispatch, state) => { +module.exports = GitBook.createPlugin({ + init: (dispatch, getState) => { dispatch(GitBook.registerComponent(SearchInput, { role: 'search:input' })); dispatch(GitBook.registerComponent(SearchResults, { role: 'search:results' })); }, - reducers -); + reduce: reducers, + actions: { + search + } +}); |