2017-04-01 04:59:54 +11:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import SearchResults from '../components/search_results';
|
2018-05-28 05:45:30 +10:00
|
|
|
import { fetchTrends } from '../../../actions/trends';
|
2017-04-01 04:59:54 +11:00
|
|
|
|
|
|
|
const mapStateToProps = state => ({
|
2017-05-21 01:31:47 +10:00
|
|
|
results: state.getIn(['search', 'results']),
|
2018-06-01 22:22:42 +10:00
|
|
|
trends: state.getIn(['trends', 'items']),
|
2017-04-01 04:59:54 +11:00
|
|
|
});
|
|
|
|
|
2018-05-28 05:45:30 +10:00
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
|
|
fetchTrends: () => dispatch(fetchTrends()),
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);
|