From ae9b00dca8efd598c9e221f919d3bcac6b414a56 Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 21 May 2026 15:59:02 +0200 Subject: [PATCH] [Glitch] Use display name component for empty message Port cafe7ea35c0d3dbde2ce2dad22989b8b30a16dca to glitch-soc Signed-off-by: Claire --- .../account_featured/components/empty_message.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/javascript/flavours/glitch/features/account_featured/components/empty_message.tsx b/app/javascript/flavours/glitch/features/account_featured/components/empty_message.tsx index a2b723e3e6..2b29bf4238 100644 --- a/app/javascript/flavours/glitch/features/account_featured/components/empty_message.tsx +++ b/app/javascript/flavours/glitch/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 '@/flavours/glitch/actions/modal'; import { Button } from '@/flavours/glitch/components/button'; +import { DisplayName } from '@/flavours/glitch/components/display_name'; import { EmptyState } from '@/flavours/glitch/components/empty_state'; import { LimitedAccountHint } from '@/flavours/glitch/components/limited_account_hint'; import { areCollectionsEnabled } from '@/flavours/glitch/features/collections/utils'; +import { useAccount } from '@/flavours/glitch/hooks/useAccount'; import { useCurrentAccountId } from '@/flavours/glitch/hooks/useAccountId'; import { useAppDispatch } from '@/flavours/glitch/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 {