diff --git a/packages/nicolium/src/columns/trends.tsx b/packages/nicolium/src/columns/trends.tsx index bdbcd2ca0..eb0878c1d 100644 --- a/packages/nicolium/src/columns/trends.tsx +++ b/packages/nicolium/src/columns/trends.tsx @@ -1,14 +1,18 @@ import clsx from 'clsx'; import React from 'react'; +import { FormattedMessage } from 'react-intl'; import AccountContainer from '@/components/accounts/account-container'; +import { EmptyMessage } from '@/components/empty-message'; import Hashtag from '@/components/hashtag'; import ScrollableList from '@/components/scrollable-list'; import StatusContainer from '@/components/statuses/status-container'; import TrendingLink from '@/components/trending-link'; +import Button from '@/components/ui/button'; import PlaceholderAccount from '@/features/placeholder/components/placeholder-account'; import PlaceholderHashtag from '@/features/placeholder/components/placeholder-hashtag'; import PlaceholderStatus from '@/features/placeholder/components/placeholder-status'; +import { useFeatures } from '@/hooks/use-features'; import { useSuggestedAccounts } from '@/queries/trends/use-suggested-accounts'; import { useTrendingLinks } from '@/queries/trends/use-trending-links'; import { useTrendingStatuses } from '@/queries/trends/use-trending-statuses'; @@ -21,6 +25,8 @@ interface ITrendsColumn { } const TrendsColumn: React.FC = ({ type, multiColumn }) => { + const features = useFeatures(); + const { data: accounts, isFetching: isFetchingAccounts, @@ -56,6 +62,40 @@ const TrendsColumn: React.FC = ({ type, multiColumn }) => { isFetching = isFetchingAccounts; isLoading = isLoadingAccounts; placeholderComponent = PlaceholderAccount; + + console.log(accounts, isFetching, isLoading); + if (!isFetching && !isLoading && accounts?.length === 0) { + children = [ + + +
+ {features.profileDirectory ? ( + <> + + + + ) : ( + + )} + + } + />, + ]; + } break; } case 'hashtags': { diff --git a/packages/nicolium/src/locales/en.json b/packages/nicolium/src/locales/en.json index d6b6f48b0..fb8deb5f1 100644 --- a/packages/nicolium/src/locales/en.json +++ b/packages/nicolium/src/locales/en.json @@ -2015,6 +2015,9 @@ "timeline.gap.load_recent": "Load recent posts", "toast.view": "View", "trends.count_by_accounts": "{count} {rawCount, plural, one {person} other {people}} talking", + "trends.no_accounts.first_line": "No suggested accounts found.", + "trends.no_accounts.second_line": "Try entering a search query or browsing the profile directory to find accounts to follow.", + "trends.no_accounts.second_line.no_directory": "Try entering a search query to find accounts to follow.", "trends.title": "Trends", "trends_panel.view_all": "View all", "unauthorized_modal.text": "You need to be logged in to do that.",