From 7ba5905416ab9e62e429fdd21bc353aaeb312375 Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 9 Oct 2022 11:23:06 +0200 Subject: Restore ability to discard interactions-based follow suggestions --- app/javascript/flavours/glitch/features/explore/suggestions.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/features/explore/suggestions.js') diff --git a/app/javascript/flavours/glitch/features/explore/suggestions.js b/app/javascript/flavours/glitch/features/explore/suggestions.js index 7e513fa96..ccd2c950a 100644 --- a/app/javascript/flavours/glitch/features/explore/suggestions.js +++ b/app/javascript/flavours/glitch/features/explore/suggestions.js @@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import AccountCard from 'flavours/glitch/features/directory/components/account_card'; import LoadingIndicator from 'flavours/glitch/components/loading_indicator'; import { connect } from 'react-redux'; -import { fetchSuggestions } from 'flavours/glitch/actions/suggestions'; +import { fetchSuggestions, dismissSuggestion } from 'flavours/glitch/actions/suggestions'; const mapStateToProps = state => ({ suggestions: state.getIn(['suggestions', 'items']), @@ -25,13 +25,18 @@ class Suggestions extends React.PureComponent { dispatch(fetchSuggestions(true)); } + handleDismiss = (accountId) => { + const { dispatch } = this.props; + dispatch(dismissSuggestion(accountId)); + } + render () { const { isLoading, suggestions } = this.props; return (
{isLoading ? : suggestions.map(suggestion => ( - + ))}
); -- cgit