From 0147af156cb6891138f9fa819b60a9fe06082022 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Mon, 10 Jan 2022 11:13:07 +0800 Subject: [PATCH] File page: use compact follower count --- ui/component/claimPreview/view.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index 24b9cf3d7..523c89671 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -10,6 +10,7 @@ import * as COLLECTIONS_CONSTS from 'constants/collections'; import { isChannelClaim } from 'util/claim'; import { formatLbryUrlForWeb } from 'util/url'; import { formatClaimPreviewTitle } from 'util/formatAriaLabel'; +import { toCompactNotation } from 'util/string'; import FileThumbnail from 'component/fileThumbnail'; import UriIndicator from 'component/uriIndicator'; import PreviewOverlayProperties from 'component/previewOverlayProperties'; @@ -165,10 +166,12 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { if (channelSubCount === undefined) { return ; } - const formattedSubCount = Number(channelSubCount).toLocaleString(); + return ( - {channelSubCount === 1 ? __('1 Follower') : __('%formattedSubCount% Followers', { formattedSubCount })} + {channelSubCount === 1 + ? __('1 Follower') + : __('%formattedSubCount% Followers', { formattedSubCount: toCompactNotation(channelSubCount) })} ); }, [channelSubCount]);