Allow more agents & dynamic setting of agent count
This commit is contained in:
parent
0f5dd1f820
commit
09e672442b
12 changed files with 144 additions and 49 deletions
11
src/utils/format-number.ts
Normal file
11
src/utils/format-number.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export const formatNumber = (value: number, unit = ''): string => {
|
||||
if (value >= 1e6) {
|
||||
return `${(value / 1e6).toFixed(1)} million ${unit}`;
|
||||
}
|
||||
|
||||
if (value >= 1e3) {
|
||||
return `${(value / 1e3).toFixed(1)} thousand ${unit}`;
|
||||
}
|
||||
|
||||
return `${value === Math.floor(value) ? value : value.toFixed(2)}${unit}`;
|
||||
};
|
||||
Loading…
Reference in a new issue