Display upload and download for infinite ratio

This commit is contained in:
Luminarys 2018-01-16 21:17:05 -08:00
parent 1be9102388
commit 32c81e251f

View File

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