Merge pull request #26 from Luminarys/master
Display upload and download for infinite ratio
This commit is contained in:
commit
3de379d742
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue
Block a user