import {View} from 'react-native' import {type AppBskyActorDefs} from '@atproto/api' import {msg, plural} from '@lingui/macro' import {useLingui} from '@lingui/react' import {makeProfileLink} from '#/lib/routes/links' import {type Shadow} from '#/state/cache/types' import {formatCount} from '#/view/com/util/numeric/format' import {atoms as a, useTheme} from '#/alf' import {InlineLinkText} from '#/components/Link' import {Text} from '#/components/Typography' export function ProfileHeaderMetrics({ profile, }: { profile: Shadow }) { const t = useTheme() const {_, i18n} = useLingui() const following = formatCount(i18n, profile.followsCount || 0) const followers = formatCount(i18n, profile.followersCount || 0) const pluralizedFollowers = plural(profile.followersCount || 0, { one: 'follower', other: 'followers', }) const pluralizedFollowings = plural(profile.followsCount || 0, { one: 'following', other: 'following', }) return ( {followers} {pluralizedFollowers} {following} {pluralizedFollowings} {formatCount(i18n, profile.postsCount || 0)}{' '} {plural(profile.postsCount || 0, {one: 'post', other: 'posts'})} ) }