format follower count
This commit is contained in:
parent
5208be07ab
commit
b9bd164b10
1 changed files with 4 additions and 2 deletions
|
@ -168,15 +168,17 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
const shouldHideActions = hideActions || isMyCollection || type === 'small' || type === 'tooltip';
|
||||
const canonicalUrl = claim && claim.canonical_url;
|
||||
const lastCollectionIndex = collectionUris ? collectionUris.length - 1 : 0;
|
||||
|
||||
const channelSubscribers = React.useMemo(() => {
|
||||
if (channelSubCount === undefined) {
|
||||
return <span />;
|
||||
}
|
||||
const formattedSubCount = Number(channelSubCount).toLocaleString();
|
||||
return (
|
||||
<span className="claim-preview__channel-sub-count">
|
||||
{channelSubCount === 1
|
||||
? __('%channelSubCount% Follower', { channelSubCount })
|
||||
: __('%channelSubCount% Followers', { channelSubCount })}
|
||||
? __('%channelSubCount% Follower', { formattedSubCount })
|
||||
: __('%channelSubCount% Followers', { formattedSubCount })}
|
||||
</span>
|
||||
);
|
||||
}, [channelSubCount]);
|
||||
|
|
Loading…
Reference in a new issue