Fix follower count
This commit is contained in:
parent
69128906c4
commit
fad0a70610
@ -66,6 +66,13 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return value
|
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">
|
<div class="ml-3 content-between">
|
||||||
<h1 class="text-2xl md:text-4xl font-bold">{{ data.username }}</h1>
|
<h1 class="text-2xl md:text-4xl font-bold">{{ data.username }}</h1>
|
||||||
<h1 v-if="!data.stream" class="font-bold text-md self-end">
|
<h1 v-if="!data.stream" class="font-bold text-md self-end">
|
||||||
{{ data.followersAbbv }} Followers
|
{{ abbreviate(data.followers) }} Followers
|
||||||
</h1>
|
</h1>
|
||||||
<div v-else class="w-[14rem] md:w-[17rem]">
|
<div v-else class="w-[14rem] md:w-[17rem]">
|
||||||
<p class="text-sm font-bold text-gray-200 self-end">
|
<p class="text-sm font-bold text-gray-200 self-end">
|
||||||
@ -138,7 +145,7 @@ export default {
|
|||||||
|
|
||||||
<div class="pt-2 inline-flex">
|
<div class="pt-2 inline-flex">
|
||||||
<follow-button :username="data.username"></follow-button>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user