about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-10-23 00:08:39 +0200
committerThibG <thib@sitedethib.com>2019-04-22 20:15:47 +0200
commit9b9816aba6c97eae9ea35698b185fe3deb3a870a (patch)
treeea009d33977dde6d877a4021e3232bf5555efe58 /app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
parent149aa07409ef7cd17098a28510e515530b173f13 (diff)
[Glitch] Show suggested follows on search screen in mobile layout
Port ad510db3a19640267f94062756d558a45472af14 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/features/compose/containers/search_results_container.js')
-rw-r--r--app/javascript/flavours/glitch/features/compose/containers/search_results_container.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js b/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
index 16d95d417..f9637861a 100644
--- a/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
+++ b/app/javascript/flavours/glitch/features/compose/containers/search_results_container.js
@@ -1,8 +1,15 @@
 import { connect } from 'react-redux';
 import SearchResults from '../components/search_results';
+import { fetchSuggestions, dismissSuggestion } from '../../../actions/suggestions';
 
 const mapStateToProps = state => ({
   results: state.getIn(['search', 'results']),
+  suggestions: state.getIn(['suggestions', 'items']),
 });
 
-export default connect(mapStateToProps)(SearchResults);
+const mapDispatchToProps = dispatch => ({
+  fetchSuggestions: () => dispatch(fetchSuggestions()),
+  dismissSuggestion: account => dispatch(dismissSuggestion(account.get('id'))),
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(SearchResults);