masto-fe/app/javascript/mastodon/features/compose/containers/search_results_container.js

16 lines
583 B
JavaScript
Raw Normal View History

2017-03-31 17:59:54 +00:00
import { connect } from 'react-redux';
import SearchResults from '../components/search_results';
import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions';
2017-03-31 17:59:54 +00:00
const mapStateToProps = state => ({
results: state.getIn(['search', 'results']),
suggestions: state.getIn(['suggestions', 'items']),
2017-03-31 17:59:54 +00:00
});
const mapDispatchToProps = dispatch => ({
fetchSuggestions: () => dispatch(fetchSuggestions()),
dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
});
export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);