fix: Hide free quota display for zero quotas

- Remove the quota display for Zero quotas
- Parse the `const quotaPerUnit` once
This commit is contained in:
Laisky.Cai
2024-03-02 02:09:01 +00:00
parent 5bdf577b0e
commit 359fc6aa18
2 changed files with 0 additions and 8 deletions

View File

@@ -125,10 +125,6 @@ export function timestamp2string(timestamp) {
}
export function calculateQuota(quota = 0, digits = 2) {
if (!quota || quota === 0) {
return 'free';
}
let quotaPerUnit = localStorage.getItem('quota_per_unit');
quotaPerUnit = parseFloat(quotaPerUnit);

View File

@@ -38,10 +38,6 @@ export function renderNumber(num) {
}
export function renderQuota(quota, digits = 2) {
if (quota === 0) {
return 'free';
}
let quotaPerUnit = localStorage.getItem('quota_per_unit');
let displayInCurrency = localStorage.getItem('display_in_currency');
quotaPerUnit = parseFloat(quotaPerUnit);