glitch-soc/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
Eugen Rochko 51411267fd [Glitch] Add search results pagination to web UI (#11409)
Port 8a4674f2c3 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
2019-07-28 17:10:52 +02:00

19 lines
746 B
JavaScript

import { connect } from 'react-redux';
import SearchResults from '../components/search_results';
import { fetchSuggestions, dismissSuggestion } from 'mastodon/actions/suggestions';
import { expandSearch } from 'mastodon/actions/search';
const mapStateToProps = state => ({
results: state.getIn(['search', 'results']),
suggestions: state.getIn(['suggestions', 'items']),
searchTerm: state.getIn(['search', 'searchTerm']),
});
const mapDispatchToProps = dispatch => ({
fetchSuggestions: () => dispatch(fetchSuggestions()),
expandSearch: type => dispatch(expandSearch(type)),
dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
});
export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);