about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
blob: f9637861ae7b437c632f10f0967590f0e98df3b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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']),
});

const mapDispatchToProps = dispatch => ({
  fetchSuggestions: () => dispatch(fetchSuggestions()),
  dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
});

export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);