From cafe7ea35c0d3dbde2ce2dad22989b8b30a16dca Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 21 May 2026 15:59:02 +0200 Subject: [PATCH] Use display name component for empty message (#39131) --- .../account_featured/components/empty_message.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/features/account_featured/components/empty_message.tsx b/app/javascript/mastodon/features/account_featured/components/empty_message.tsx index 19ced4ce23c..aa1dc4078ea 100644 --- a/app/javascript/mastodon/features/account_featured/components/empty_message.tsx +++ b/app/javascript/mastodon/features/account_featured/components/empty_message.tsx @@ -2,14 +2,15 @@ import { useCallback } from 'react'; import { FormattedMessage } from 'react-intl'; -import { useParams } from 'react-router'; import { Link } from 'react-router-dom'; import { openModal } from '@/mastodon/actions/modal'; import { Button } from '@/mastodon/components/button'; +import { DisplayName } from '@/mastodon/components/display_name'; import { EmptyState } from '@/mastodon/components/empty_state'; import { LimitedAccountHint } from '@/mastodon/components/limited_account_hint'; import { areCollectionsEnabled } from '@/mastodon/features/collections/utils'; +import { useAccount } from '@/mastodon/hooks/useAccount'; import { useCurrentAccountId } from '@/mastodon/hooks/useAccountId'; import { useAppDispatch } from '@/mastodon/store'; @@ -28,8 +29,8 @@ export const EmptyMessage: React.FC = ({ blockedBy, withoutAddCollectionButton, }) => { - const { acct } = useParams<{ acct?: string }>(); const me = useCurrentAccountId(); + const account = useAccount(accountId); const dispatch = useAppDispatch(); @@ -116,12 +117,12 @@ export const EmptyMessage: React.FC = ({ /> ); } else { - if (acct) { + if (account) { title = ( }} /> ); } else {