From 2abdc4f4d76ceff864c54a924724fe68a5e2d056 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 10 Jul 2024 14:59:13 +0300 Subject: [PATCH] Shared: Fixed display of quota for archive room. --- packages/shared/utils/common.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/shared/utils/common.ts b/packages/shared/utils/common.ts index 42ee08e75e..6abc5e4eba 100644 --- a/packages/shared/utils/common.ts +++ b/packages/shared/utils/common.ts @@ -663,11 +663,14 @@ export const getSpaceQuotaAsText = ( isDefaultQuotaSet: boolean, ) => { const usedValue = getConvertedQuota(t, usedSpace); + + if (!isDefaultQuotaSet) return usedValue; + + if (!quotaLimit) return usedValue; + const quotaValue = getConvertedQuota(t, quotaLimit); - if (isDefaultQuotaSet) return `${usedValue} / ${quotaValue}`; - - return usedValue; + return `${usedValue} / ${quotaValue}`; }; export const conversionToBytes = (size: number, power: number) => {