mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 19:46:18 +00:00
Update hardware.tsx
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user