From a392863cbe21a5faffeed975b933b97640c7c8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Wed, 13 Apr 2022 08:29:11 +0200 Subject: [PATCH] fix(dashboard-v2): use binary: true --- packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js | 2 +- .../dashboard-v2/src/components/CurrentUsage/CurrentUsage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js b/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js index 62828ded..d6df8506 100644 --- a/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js +++ b/packages/dashboard-v2/src/components/CurrentPlan/CurrentPlan.js @@ -33,7 +33,7 @@ const CurrentPlan = () => {

{activePlan.name}

{activePlan.price === 0 && activePlan.limits && ( -

{prettyBytes(activePlan.limits.storageLimit)} without paying a dime! 🎉

+

{prettyBytes(activePlan.limits.storageLimit, { binary: true })} without paying a dime! 🎉

)} {activePlan.price !== 0 && (user.subscriptionCancelAtPeriodEnd ? ( diff --git a/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js b/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js index 081b9cca..3947638d 100644 --- a/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js +++ b/packages/dashboard-v2/src/components/CurrentUsage/CurrentUsage.js @@ -44,7 +44,7 @@ const useUsageData = () => { }; const size = (bytes) => { - const text = fileSize(bytes ?? 0, { maximumFractionDigits: 0 }); + const text = fileSize(bytes ?? 0, { maximumFractionDigits: 0, binary: true }); const [value, unit] = text.split(" "); return {