Update hardware.tsx

This commit is contained in:
MacRimi
2025-10-11 00:00:21 +02:00
parent 7fc05b96a2
commit 99e775a283

View File

@@ -30,6 +30,12 @@ const formatMemory = (memoryKB: number | string): string => {
// Convert KB to MB // Convert KB to MB
const mb = kb / 1024 const mb = kb / 1024
// Convert to TB if >= 1024 GB
if (mb >= 1024 * 1024) {
const tb = mb / (1024 * 1024)
return `${tb.toFixed(1)} TB`
}
// Convert to GB if >= 1024 MB // Convert to GB if >= 1024 MB
if (mb >= 1024) { if (mb >= 1024) {
const gb = mb / 1024 const gb = mb / 1024