1ff70886a1
Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
21 lines
748 B
JavaScript
21 lines
748 B
JavaScript
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);
|