Display upload and download for infinite ratio

master
Luminarys 2018-01-16 21:17:05 -08:00
parent 1be9102388
commit 32c81e251f
1 changed files with 1 additions and 8 deletions

View File

@ -11,17 +11,10 @@ export default function Ratio({ up, down }) {
<span></span>
</span>;
}
if (!isFinite(ratio)) {
return <span class="ratio">
<strong></strong>
<span></span>
<span></span>
</span>;
}
return (
<span class="ratio">
<span>
{`${ratio.toFixed(2)}`}
{isFinite(ratio) ? `${ratio.toFixed(2)}` : "∞"}
</span>
<span>{formatAmount(up)} <FontAwesome name="arrow-up" /></span>
<span>{`${formatAmount(down)}`} <FontAwesome name="arrow-down" /></span>