fix(dashboard-v2): use binary: true
This commit is contained in:
parent
b731d80ea0
commit
a392863cbe
|
@ -33,7 +33,7 @@ const CurrentPlan = () => {
|
||||||
<h4>{activePlan.name}</h4>
|
<h4>{activePlan.name}</h4>
|
||||||
<div className="text-palette-400 justify-between flex flex-col grow">
|
<div className="text-palette-400 justify-between flex flex-col grow">
|
||||||
{activePlan.price === 0 && activePlan.limits && (
|
{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 &&
|
{activePlan.price !== 0 &&
|
||||||
(user.subscriptionCancelAtPeriodEnd ? (
|
(user.subscriptionCancelAtPeriodEnd ? (
|
||||||
|
|
|
@ -44,7 +44,7 @@ const useUsageData = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const size = (bytes) => {
|
const size = (bytes) => {
|
||||||
const text = fileSize(bytes ?? 0, { maximumFractionDigits: 0 });
|
const text = fileSize(bytes ?? 0, { maximumFractionDigits: 0, binary: true });
|
||||||
const [value, unit] = text.split(" ");
|
const [value, unit] = text.split(" ");
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Reference in New Issue