feat(dashboard-v2): use true reported bandwidth values
This commit is contained in:
parent
18600533eb
commit
c964086f7b
|
@ -59,7 +59,7 @@ const Price = ({ price }) => (
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
const bandwidth = (value) => parseFloat(bytes(value, { bits: true, binary: true }));
|
const bandwidth = (value) => `${bytes(value, { bits: true })}/s`;
|
||||||
|
|
||||||
const storage = (value) => bytes(value, { binary: true });
|
const storage = (value) => bytes(value, { binary: true });
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ const PlansSlider = () => {
|
||||||
|
|
||||||
if (userError || plansError) {
|
if (userError || plansError) {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center text-error">
|
<div className="flex flex-col items-center justify-center">
|
||||||
<h3>Oooops!</h3>
|
<h3>Oooops!</h3>
|
||||||
<p>Something went wrong, please try again later.</p>
|
<p>Something went wrong, please try again later.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,6 +99,7 @@ const PlansSlider = () => {
|
||||||
{!isHigherThanCurrent && !isCurrent && "Choose"}
|
{!isHigherThanCurrent && !isCurrent && "Choose"}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
{plan.limits && (
|
||||||
<ul className="-ml-2">
|
<ul className="-ml-2">
|
||||||
<PlanSummaryItem>
|
<PlanSummaryItem>
|
||||||
Pin up to {storage(plan.limits.storageLimit)} of censorship-resistant storage
|
Pin up to {storage(plan.limits.storageLimit)} of censorship-resistant storage
|
||||||
|
@ -106,9 +107,10 @@ const PlansSlider = () => {
|
||||||
<PlanSummaryItem>
|
<PlanSummaryItem>
|
||||||
Support for up to {localizedNumber(plan.limits.maxNumberUploads)} files
|
Support for up to {localizedNumber(plan.limits.maxNumberUploads)} files
|
||||||
</PlanSummaryItem>
|
</PlanSummaryItem>
|
||||||
<PlanSummaryItem>{bandwidth(plan.limits.uploadBandwidth)} mbps upload bandwidth</PlanSummaryItem>
|
<PlanSummaryItem>{bandwidth(plan.limits.uploadBandwidth)} upload bandwidth</PlanSummaryItem>
|
||||||
<PlanSummaryItem>{bandwidth(plan.limits.downloadBandwidth)} mbps download bandwidth</PlanSummaryItem>
|
<PlanSummaryItem>{bandwidth(plan.limits.downloadBandwidth)} download bandwidth</PlanSummaryItem>
|
||||||
</ul>
|
</ul>
|
||||||
|
)}
|
||||||
</Panel>
|
</Panel>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
Reference in New Issue