aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/container/Search.js
blob: 1b5a41d05bf3a3fcd7f9b4238fd5b5a4308610e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;