Fix follower count

This commit is contained in:
dragongoose 2023-04-20 09:49:56 -04:00
parent 69128906c4
commit fad0a70610
Signed by: dragongoose
GPG key ID: 50DB99B921579009

View file

@ -66,6 +66,13 @@ export default {
} else {
return value
}
},
abbreviate(text: number) {
return Intl.NumberFormat('en-US', {
//@ts-ignore
notation: 'compact',
maximumFractionDigits: 1
}).format(text)
}
}
}
@ -105,7 +112,7 @@ export default {
<div class="ml-3 content-between">
<h1 class="text-2xl md:text-4xl font-bold">{{ data.username }}</h1>
<h1 v-if="!data.stream" class="font-bold text-md self-end">
{{ data.followersAbbv }} Followers
{{ abbreviate(data.followers) }} Followers
</h1>
<div v-else class="w-[14rem] md:w-[17rem]">
<p class="text-sm font-bold text-gray-200 self-end">
@ -138,7 +145,7 @@ export default {
<div class="pt-2 inline-flex">
<follow-button :username="data.username"></follow-button>
<p class="align-baseline font-bold ml-3">{{ data.followersAbbv }} Followers</p>
<p class="align-baseline font-bold ml-3">{{ abbreviate(data.followers) }} Followers</p>
</div>
</div>