import React, { Component } from 'react'; import { connect } from 'react-redux'; import { activeTorrents, selectTorrent, selectop } from '../torrent_state'; import { formatBitrate } from '../bitrate'; class TorrentTable extends Component { render() { const { torrents } = this.props; const active = activeTorrents(); return (
name | up | down | ratio | |
---|---|---|---|---|
selectTorrent(t, e.target.checked ? selectop.UNION : selectop.SUBTRACT)} /> | { e.preventDefault(); selectTorrent(t, selectop.EXCLUSIVE); }} > {t.name} | {formatBitrate(t.rate_up)} | {formatBitrate(t.rate_down)} | {(t.transferred_up / t.transferred_down).toFixed(2)} |