5b3d70ffa7
Follow-up to #11112
17 lines
636 B
JavaScript
17 lines
636 B
JavaScript
import { connect } from 'react-redux';
|
|
import SearchResults from '../components/search_results';
|
|
import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions';
|
|
|
|
const mapStateToProps = state => ({
|
|
results: state.getIn(['search', 'results']),
|
|
suggestions: state.getIn(['suggestions', 'items']),
|
|
searchTerm: state.getIn(['search', 'searchTerm']),
|
|
});
|
|
|
|
const mapDispatchToProps = dispatch => ({
|
|
fetchSuggestions: () => dispatch(fetchSuggestions()),
|
|
dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
|
|
});
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);
|