fix dashboard + live demo

This commit is contained in:
Emily
2024-09-04 14:00:03 +02:00
parent d7e18d570f
commit 8b026099de
6 changed files with 55 additions and 38 deletions

View File

@@ -9,6 +9,7 @@ export function formatNumberK(value: string | number, decimals: number = 1) {
if (num > 1_000_000) return (num / 1_000_000).toFixed(decimals) + ' M';
if (num > 1_000) return (num / 1_000).toFixed(decimals) + ' K';
return num.toFixed();
return isNaN(num) ? '0' : num.toFixed();
}