Showing usage data in GB in the fetch table

This commit is contained in:
atyabbin 2024-06-27 15:59:39 +05:30
parent f11cc82e44
commit 65c72f6cf5

View File

@ -103,6 +103,8 @@ export const App: React.FC = () => {
displayValue = new Date(value / 1000).toLocaleString();
} else if (key === "storage" && typeof value === "number") {
displayValue = `${(value / 1024 ** 3).toFixed(2)} GB`;
} else if (key === "usage" && typeof value === "number") {
displayValue = `${(value / 1024 ** 3).toFixed(2)} GB`;
} else if (typeof value === "string") {
try {
const parsedValue = JSON.parse(