From 68dce3f2c9bb2c32a2e9d326abd0e94b32b16be5 Mon Sep 17 00:00:00 2001 From: Anton Shepilov Date: Mon, 4 Mar 2024 18:59:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Display=20the=20same=20quota=20f?= =?UTF-8?q?or=20all=20the=20pages=20(#407)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/views/client/common/disk-usage.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tdrive/frontend/src/app/views/client/common/disk-usage.tsx b/tdrive/frontend/src/app/views/client/common/disk-usage.tsx index 554e0777..6f2128b0 100644 --- a/tdrive/frontend/src/app/views/client/common/disk-usage.tsx +++ b/tdrive/frontend/src/app/views/client/common/disk-usage.tsx @@ -18,14 +18,18 @@ const DiskUsage = () => { const { quota } = useUserQuota() useEffect(() => { - setUsed(Math.round(quota.used / quota.total * 100)) - setUsedBytes(quota.used); - setTotalBytes(quota.total); + if (FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_USER_QUOTA)) { + setUsed(Math.round(quota.used / quota.total * 100)) + setUsedBytes(quota.used); + setTotalBytes(quota.total); + } }, [quota]); const { item } = useDriveItem(viewId || "root"); useEffect(() => { - setUsedBytes(item?.size || 0); + if (!FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_USER_QUOTA)) { + setUsedBytes(item?.size || 0); + } }, [viewId, item]) return (