You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
583 B

7 years ago
7 years ago
7 years ago
  1. import { connect } from 'react-redux';
  2. import SearchResults from '../components/search_results';
  3. import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions';
  4. const mapStateToProps = state => ({
  5. results: state.getIn(['search', 'results']),
  6. suggestions: state.getIn(['suggestions', 'items']),
  7. });
  8. const mapDispatchToProps = dispatch => ({
  9. fetchSuggestions: () => dispatch(fetchSuggestions()),
  10. dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
  11. });
  12. export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);