Add loading indicator and empty result message to advanced interface search (#30085)

This commit is contained in:
Claire 2024-04-29 11:55:41 +02:00 committed by GitHub
parent ac7f4d57bb
commit 7d3fe2b4c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 62 additions and 75 deletions

View file

@ -1,20 +0,0 @@
import { connect } from 'react-redux';
import { expandSearch } from 'mastodon/actions/search';
import { fetchSuggestions, dismissSuggestion } from 'mastodon/actions/suggestions';
import SearchResults from '../components/search_results';
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);