fix(dashboard-v2): use binary: true

This commit is contained in:
Michał Leszczyk 2022-04-13 08:29:11 +02:00
parent b731d80ea0
commit a392863cbe
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ const CurrentPlan = () => {
<h4>{activePlan.name}</h4>
<div className="text-palette-400 justify-between flex flex-col grow">
{activePlan.price === 0 && activePlan.limits && (
<p>{prettyBytes(activePlan.limits.storageLimit)} without paying a dime! 🎉</p>
<p>{prettyBytes(activePlan.limits.storageLimit, { binary: true })} without paying a dime! 🎉</p>
)}
{activePlan.price !== 0 &&
(user.subscriptionCancelAtPeriodEnd ? (

View File

@ -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 {