mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 11:36:17 +00:00
Update hardware.tsx
This commit is contained in:
@@ -30,6 +30,12 @@ const formatMemory = (memoryKB: number | string): string => {
|
||||
// Convert KB to MB
|
||||
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
|
||||
if (mb >= 1024) {
|
||||
const gb = mb / 1024
|
||||
|
||||
Reference in New Issue
Block a user