import React from "react" export default function Stats(props) { return (

Stats

); } function Stat(props) { return (

{props.name} {props.count}

); } function TorrentsStat(props) { if (props.data.torrentCount === undefined) { return (No torrents); } const percentage = Math.floor((props.data.torrentCountById * 100) / props.data.count); return ( {percentage}% with torrents   - {props.data.torrentCount} total ); }