2017-03-31 17:59:54 +00:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import SearchResults from '../components/search_results';
|
2018-05-27 19:45:30 +00:00
|
|
|
import { fetchTrends } from '../../../actions/trends';
|
2017-03-31 17:59:54 +00:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2017-05-20 15:31:47 +00:00
|
|
|
results: state.getIn(['search', 'results']),
|
2018-05-27 19:45:30 +00:00
|
|
|
trends: state.get('trends'),
|
2017-03-31 17:59:54 +00:00
|
|
|
});
|
|
|
|
|
2018-05-27 19:45:30 +00:00
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
fetchTrends: () => dispatch(fetchTrends()),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);
|