diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 01:01:36 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 01:01:36 +0100 |
commit | 4ce420528dd747021f7fa51483710388f5733724 (patch) | |
tree | ed01c295124b07fdbfbce70463af9dd400ab1125 /src/client/react/components/container | |
parent | 0141d1f9f4c7ca1755e0a5da908e9d27cf7aa0e1 (diff) |
Add Search container
Diffstat (limited to 'src/client/react/components/container')
-rw-r--r-- | src/client/react/components/container/Search.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/client/react/components/container/Search.js b/src/client/react/components/container/Search.js new file mode 100644 index 0000000..1b5a41d --- /dev/null +++ b/src/client/react/components/container/Search.js @@ -0,0 +1,20 @@ +import { connect } from 'react-redux'; +import { type } from '../../actions'; +import PresentationalSearch from '../presentational/Search'; + +const mapStateToProps = state => ({ + results: state.searchResults, +}); + +const mapDispatchToProps = dispatch => ({ + onType: (event) => { + dispatch(type(event.target.value)); + }, +}); + +const Search = connect( + mapStateToProps, + mapDispatchToProps, +)(PresentationalSearch); + +export default Search; |