From eefd4f995adaff18d7d6f1bb48e5656a135d43bb Mon Sep 17 00:00:00 2001 From: Yashwin Date: Tue, 12 May 2026 15:50:17 +0530 Subject: [PATCH] refactor: update storage quota configuration from megabytes to gigabytes --- src/pages/tenant/StorageDashboard.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/tenant/StorageDashboard.tsx b/src/pages/tenant/StorageDashboard.tsx index 3b20248..554c86c 100644 --- a/src/pages/tenant/StorageDashboard.tsx +++ b/src/pages/tenant/StorageDashboard.tsx @@ -4,7 +4,6 @@ import { ShieldCheck, Building2, Package, - // AlertCircle, Pencil, HardDrive, Files, @@ -58,12 +57,13 @@ const QuotaEditModal = ({ quota, onUpdated, }: QuotaEditModalProps) => { - const [maxStorageMB, setMaxStorageMB] = useState( + const [maxStorageGB, setMaxStorageGB] = useState( Math.floor( (typeof quota.max_storage_bytes === "string" ? parseInt(quota.max_storage_bytes) : quota.max_storage_bytes) / 1024 / + 1024 / 1024, ), ); @@ -76,7 +76,7 @@ const QuotaEditModal = ({ setIsUpdating(true); try { await fileAttachmentService.updateQuota({ - max_storage_bytes: maxStorageMB * 1024 * 1024, + max_storage_bytes: maxStorageGB * 1024 * 1024 * 1024, max_file_size_bytes: maxFileMB * 1024 * 1024, }); onUpdated(); @@ -114,11 +114,11 @@ const QuotaEditModal = ({ >
setMaxStorageMB(parseInt(e.target.value) || 0)} - placeholder="e.g. 10240 for 10GB" + value={maxStorageGB} + onChange={(e) => setMaxStorageGB(parseInt(e.target.value) || 0)} + placeholder="e.g. 10 for 10GB" />