about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/explore/suggestions.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-09-29 04:39:33 +0200
committerGitHub <noreply@github.com>2022-09-29 04:39:33 +0200
commit43b5d5e38d2b8ad8f1d1ad0911c3c1718159c912 (patch)
treeedfad4e2db222aeba66c8c9e0d27f6a327ac9b98 /app/javascript/mastodon/features/explore/suggestions.js
parent1a5150e9c364635b989cd0983dac259f94dbbea9 (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.js11
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 => (