diff options
Diffstat (limited to 'src/client/react/components/container/Search.js')
-rw-r--r-- | src/client/react/components/container/Search.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/react/components/container/Search.js b/src/client/react/components/container/Search.js index 65b2933..fc741c6 100644 --- a/src/client/react/components/container/Search.js +++ b/src/client/react/components/container/Search.js @@ -183,11 +183,15 @@ class Search extends React.Component { } } -const mapStateToProps = (state, { location, history }) => ({ - setUser: makeSetUser(location, history), +const mapStateToProps = state => ({ results: state.search.results, searchText: state.search.text, selectedResult: state.search.selected, }); -export default withRouter(connect(mapStateToProps)(Search)); +const mapDispatchToProps = (dispatch, { location, history }) => ({ + setUser: makeSetUser(location, history), + dispatch, +}); + +export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Search)); |