Spaces:
Running
Running
Mishig
commited on
Commit
•
03202d0
1
Parent(s):
150c8c1
[Assistants] update numbering labels (#811)
Browse files
src/lib/utils/formatUserCount.ts
CHANGED
@@ -2,15 +2,15 @@ export function formatUserCount(userCount: number): string {
|
|
2 |
const userCountRanges: { min: number; max: number; label: string }[] = [
|
3 |
{ min: 0, max: 1, label: "1" },
|
4 |
{ min: 2, max: 9, label: "1-10" },
|
5 |
-
{ min: 10, max: 49, label: "+
|
6 |
-
{ min: 50, max: 99, label: "+
|
7 |
-
{ min: 100, max: 299, label: "+
|
8 |
-
{ min: 300, max: 499, label: "+
|
9 |
-
{ min: 500, max: 999, label: "+
|
10 |
-
{ min: 1_000, max: 2_999, label: "+
|
11 |
-
{ min: 3_000, max: 4_999, label: "+
|
12 |
-
{ min: 5_000, max: 9_999, label: "+
|
13 |
-
{ min: 10_000, max: Infinity, label: "+
|
14 |
];
|
15 |
|
16 |
const range = userCountRanges.find(({ min, max }) => userCount >= min && userCount <= max);
|
|
|
2 |
const userCountRanges: { min: number; max: number; label: string }[] = [
|
3 |
{ min: 0, max: 1, label: "1" },
|
4 |
{ min: 2, max: 9, label: "1-10" },
|
5 |
+
{ min: 10, max: 49, label: "10+" },
|
6 |
+
{ min: 50, max: 99, label: "50+" },
|
7 |
+
{ min: 100, max: 299, label: "100+" },
|
8 |
+
{ min: 300, max: 499, label: "300+" },
|
9 |
+
{ min: 500, max: 999, label: "500+" },
|
10 |
+
{ min: 1_000, max: 2_999, label: "1k+" },
|
11 |
+
{ min: 3_000, max: 4_999, label: "3k+" },
|
12 |
+
{ min: 5_000, max: 9_999, label: "5k+" },
|
13 |
+
{ min: 10_000, max: Infinity, label: "10k+" },
|
14 |
];
|
15 |
|
16 |
const range = userCountRanges.find(({ min, max }) => userCount >= min && userCount <= max);
|