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