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 a1d90a5d..554e0777 100644 --- a/tdrive/frontend/src/app/views/client/common/disk-usage.tsx +++ b/tdrive/frontend/src/app/views/client/common/disk-usage.tsx @@ -16,19 +16,17 @@ const DiskUsage = () => { const [usedBytes, setUsedBytes] = useState(0); const [totalBytes, setTotalBytes] = useState(0); - if (FeatureTogglesService.isActiveFeatureName(FeatureNames.COMPANY_USER_QUOTA)) { - const { quota } = useUserQuota() - useEffect(() => { - setUsed(Math.round(quota.used / quota.total * 100)) - setUsedBytes(quota.used); - setTotalBytes(quota.total); - }, [quota]); - } else if (viewId) { - const { item } = useDriveItem(viewId); - useEffect(() => { - setUsedBytes(item?.size || 0); - }, [viewId, item]) - } + const { quota } = useUserQuota() + useEffect(() => { + 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); + }, [viewId, item]) return ( <>