pl-fe: show mitra subscribers count
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -13,10 +13,11 @@ const messages = defineMessages({
|
||||
followers: { id: 'account.followers', defaultMessage: 'Followers' },
|
||||
follows: { id: 'account.follows', defaultMessage: 'Following' },
|
||||
statuses: { id: 'account.statuses', defaultMessage: 'Statuses' },
|
||||
subscribers: { id: 'account.subscribers', defaultMessage: 'Subscribers' },
|
||||
});
|
||||
|
||||
interface IProfileStats {
|
||||
account: Pick<Account, 'acct' | 'followers_count' | 'following_count' | 'statuses_count'> | undefined;
|
||||
account: Pick<Account, 'acct' | 'followers_count' | 'following_count' | 'statuses_count' | 'subscribers_count'> | undefined;
|
||||
onClickHandler?: React.MouseEventHandler;
|
||||
}
|
||||
|
||||
@ -67,6 +68,21 @@ const ProfileStats: React.FC<IProfileStats> = ({ account, onClickHandler }) => {
|
||||
</Text>
|
||||
</HStack>
|
||||
</NavLink>
|
||||
|
||||
{account.subscribers_count > 0 && (
|
||||
// <NavLink to={`/@${account.acct}/subscribers`} onClick={onClickHandler} title={intl.formatNumber(account.subscribers_count)} className='hover:underline'>
|
||||
<HStack alignItems='center' space={1}>
|
||||
{!demetricator && (
|
||||
<Text theme='primary' weight='bold' size='sm'>
|
||||
{shortNumberFormat(account.subscribers_count)}
|
||||
</Text>
|
||||
)}
|
||||
<Text weight='bold' size='sm'>
|
||||
{intl.formatMessage(messages.subscribers)}
|
||||
</Text>
|
||||
</HStack>
|
||||
// </NavLink>
|
||||
)}
|
||||
</HStack>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user