Format large numbers (#556)

This commit is contained in:
Ollie H 2023-05-01 11:31:00 -07:00 committed by GitHub
parent 7171d0404e
commit 0ec98c77ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View file

@ -39,6 +39,7 @@ import {getTabState, TabState} from 'lib/routes/helpers'
import {NavigationProp} from 'lib/routes/types'
import {useNavigationTabState} from 'lib/hooks/useNavigationTabState'
import {isWeb} from 'platform/detection'
import {formatCount} from 'view/com/util/numeric/format'
export const DrawerContent = observer(() => {
const theme = useTheme()
@ -133,11 +134,11 @@ export const DrawerContent = observer(() => {
type="xl"
style={[pal.textLight, styles.profileCardFollowers]}>
<Text type="xl-medium" style={pal.text}>
{store.me.followersCount || 0}
{formatCount(store.me.followersCount ?? 0)}
</Text>{' '}
{pluralize(store.me.followersCount || 0, 'follower')} &middot;{' '}
<Text type="xl-medium" style={pal.text}>
{store.me.followsCount || 0}
{formatCount(store.me.followsCount ?? 0)}
</Text>{' '}
following
</Text>