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 shouldHideActions = hideActions || isMyCollection || type === 'small' || type === 'tooltip';
|
||||||
const canonicalUrl = claim && claim.canonical_url;
|
const canonicalUrl = claim && claim.canonical_url;
|
||||||
const lastCollectionIndex = collectionUris ? collectionUris.length - 1 : 0;
|
const lastCollectionIndex = collectionUris ? collectionUris.length - 1 : 0;
|
||||||
|
|
||||||
const channelSubscribers = React.useMemo(() => {
|
const channelSubscribers = React.useMemo(() => {
|
||||||
if (channelSubCount === undefined) {
|
if (channelSubCount === undefined) {
|
||||||
return <span />;
|
return <span />;
|
||||||
}
|
}
|
||||||
|
const formattedSubCount = Number(channelSubCount).toLocaleString();
|
||||||
return (
|
return (
|
||||||
<span className="claim-preview__channel-sub-count">
|
<span className="claim-preview__channel-sub-count">
|
||||||
{channelSubCount === 1
|
{channelSubCount === 1
|
||||||
? __('%channelSubCount% Follower', { channelSubCount })
|
? __('%channelSubCount% Follower', { formattedSubCount })
|
||||||
: __('%channelSubCount% Followers', { channelSubCount })}
|
: __('%channelSubCount% Followers', { formattedSubCount })}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}, [channelSubCount]);
|
}, [channelSubCount]);
|
||||||
|
|
Loading…
Reference in a new issue