Display upload and download for infinite ratio
This commit is contained in:
parent
1be9102388
commit
32c81e251f
|
@ -11,17 +11,10 @@ export default function Ratio({ up, down }) {
|
||||||
<span></span>
|
<span></span>
|
||||||
</span>;
|
</span>;
|
||||||
}
|
}
|
||||||
if (!isFinite(ratio)) {
|
|
||||||
return <span class="ratio">
|
|
||||||
<strong>∞</strong>
|
|
||||||
<span></span>
|
|
||||||
<span></span>
|
|
||||||
</span>;
|
|
||||||
}
|
|
||||||
return (
|
return (
|
||||||
<span class="ratio">
|
<span class="ratio">
|
||||||
<span>
|
<span>
|
||||||
{`${ratio.toFixed(2)}`}
|
{isFinite(ratio) ? `${ratio.toFixed(2)}` : "∞"}
|
||||||
</span>
|
</span>
|
||||||
<span>{formatAmount(up)} <FontAwesome name="arrow-up" /></span>
|
<span>{formatAmount(up)} <FontAwesome name="arrow-up" /></span>
|
||||||
<span>{`${formatAmount(down)}`} <FontAwesome name="arrow-down" /></span>
|
<span>{`${formatAmount(down)}`} <FontAwesome name="arrow-down" /></span>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user