Add "Follows you" badge to AccountListItem component (#38828)

This commit is contained in:
diondiondion authored and GitHub committed 2026-04-28 15:18:02 +00:00
1 parent 6c5bd4f9a8
commit ffd7160980
9 files changed
+104 -49

No files matched your search

@@ -7,9 +7,8 @@ import classNames from 'classnames';
import Overlay from 'react-overlays/esm/Overlay';
import FollowerIcon from '@/images/icons/icon_follower.svg?react';
import { showAlert } from '@/mastodon/actions/alerts';
import { Badge } from '@/mastodon/components/badge';
import { FollowsYouBadge } from '@/mastodon/components/badge';
import { Button } from '@/mastodon/components/button';
import { DisplayName } from '@/mastodon/components/display_name';
import { Icon } from '@/mastodon/components/icon';
@@ -60,17 +59,7 @@ export const AccountName: FC<{ accountId: string }> = ({ accountId }) => {
<h1>
<DisplayName account={account} variant='simple' />
</h1>
{relationship?.followed_by && (
<Badge
icon={<FollowerIcon className={classes.followerBadgeIcon} />}
label={
<FormattedMessage
id='account.follows_you'
defaultMessage='Follows you'
/>
}
/>
)}
{relationship?.followed_by && <FollowsYouBadge />}
</div>
<AccountNameHelp
@@ -37,10 +37,6 @@
}
}
.followerBadgeIcon {
color: var(--color-text-secondary);
}
.badges {
margin-top: 8px;
}