fix: display sub-one values with two decimal places (#25)

This commit is contained in:
2026-03-08 14:11:53 -07:00
committed by Naomi Carrigan
parent d1d1f70c75
commit b82a2d3da7
2 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -73,7 +73,9 @@ const formatSuffix = (value: number): string => {
return `${(value / threshold).toFixed(2)}${suffix}`;
}
}
return value.toFixed(1);
return value < 1
? value.toFixed(2)
: value.toFixed(1);
};
/**