aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/memberCount.tsx
diff options
context:
space:
mode:
authorCommandtechno <68407783+Commandtechno@users.noreply.github.com>2022-12-03 16:11:08 -0600
committerGitHub <noreply@github.com>2022-12-03 23:11:08 +0100
commitc74241fde6707704f66f10d752044540783d4736 (patch)
treec75750371ee6f719f1ed09c9dfa46b02f0bc2ff9 /src/plugins/memberCount.tsx
parent4d8145f12ccbdcb3383387cc435147c62ec1066a (diff)
downloadVencord-c74241fde6707704f66f10d752044540783d4736.tar.gz
Vencord-c74241fde6707704f66f10d752044540783d4736.tar.bz2
Vencord-c74241fde6707704f66f10d752044540783d4736.zip
add commas in member count (#286)
l
Diffstat (limited to 'src/plugins/memberCount.tsx')
-rw-r--r--src/plugins/memberCount.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/memberCount.tsx b/src/plugins/memberCount.tsx
index c016dff..6377a9b 100644
--- a/src/plugins/memberCount.tsx
+++ b/src/plugins/memberCount.tsx
@@ -35,11 +35,13 @@ function MemberCount() {
if (!c) return null;
- let total = String(c[0]);
+ let total = c[0].toLocaleString();
if (total === "0" && c[1] > 0) {
total = "Loading...";
}
+ const online = c[1].toLocaleString();
+
return (
<Flex id="vc-membercount" style={{
marginTop: "1em",
@@ -49,7 +51,7 @@ function MemberCount() {
alignContent: "center",
gap: 0
}}>
- <Tooltip text={`${c[1]} Online`} position="bottom">
+ <Tooltip text={`${online} Online`} position="bottom">
{props => (
<div {...props}>
<span
@@ -62,11 +64,11 @@ function MemberCount() {
marginRight: "0.5em"
}}
/>
- <span style={{ color: "var(--status-green-600)" }}>{c[1]}</span>
+ <span style={{ color: "var(--status-green-600)" }}>{online}</span>
</div>
)}
</Tooltip>
- <Tooltip text={`${c[0] || "?"} Total Members`} position="bottom">
+ <Tooltip text={`${total} Total Members`} position="bottom">
{props => (
<div {...props}>
<span