Blog and projects animation

This commit is contained in:
2025-12-03 20:45:19 +01:00
parent 64ae7d0bb7
commit 5c9b9ccb17
3 changed files with 18 additions and 24 deletions
+1
View File
@@ -1,4 +1,5 @@
export default function formatNumber(num: number): string {
if (num === null) return num;
if (num < 1000) return num.toString();
if (num < 1_000_000)
return (num / 1000).toFixed(num % 1000 === 0 ? 0 : 1) + "k";