5119a0608d
* Add search results pagination to web UI Fix #10737 * Fix code style issue
18 lines
746 B
JavaScript
18 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);
|