diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-09-29 04:39:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 04:39:33 +0200 |
commit | 43b5d5e38d2b8ad8f1d1ad0911c3c1718159c912 (patch) | |
tree | edfad4e2db222aeba66c8c9e0d27f6a327ac9b98 /app/javascript/mastodon/features/explore/suggestions.js | |
parent | 1a5150e9c364635b989cd0983dac259f94dbbea9 (diff) |
Add logged-out access to the web UI (#18961)
Diffstat (limited to 'app/javascript/mastodon/features/explore/suggestions.js')
-rw-r--r-- | app/javascript/mastodon/features/explore/suggestions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/javascript/mastodon/features/explore/suggestions.js b/app/javascript/mastodon/features/explore/suggestions.js index 0c6a7ef8a..e6ad09974 100644 --- a/app/javascript/mastodon/features/explore/suggestions.js +++ b/app/javascript/mastodon/features/explore/suggestions.js @@ -5,6 +5,7 @@ import AccountCard from 'mastodon/features/directory/components/account_card'; import LoadingIndicator from 'mastodon/components/loading_indicator'; import { connect } from 'react-redux'; import { fetchSuggestions } from 'mastodon/actions/suggestions'; +import { FormattedMessage } from 'react-intl'; const mapStateToProps = state => ({ suggestions: state.getIn(['suggestions', 'items']), @@ -28,6 +29,16 @@ class Suggestions extends React.PureComponent { render () { const { isLoading, suggestions } = this.props; + if (!isLoading && suggestions.isEmpty()) { + return ( + <div className='explore__suggestions scrollable scrollable--flex'> + <div className='empty-column-indicator'> + <FormattedMessage id='empty_column.explore_statuses' defaultMessage='Nothing is trending right now. Check back later!' /> + </div> + </div> + ); + } + return ( <div className='explore__suggestions'> {isLoading ? <LoadingIndicator /> : suggestions.map(suggestion => ( |