Limit detail view to 3 torrents

This commit is contained in:
Drew DeVault 2017-08-25 19:47:22 -04:00
parent 06561f9580
commit f1e798a498

View File

@ -203,10 +203,17 @@ class TorrentDetails extends Component {
return ( return (
<div> <div>
{selection.length > 1 ? this.renderHeader(selection) : null} {selection.length > 1 ? this.renderHeader(selection) : null}
{selection.map(id => <Torrent {selection.slice(0, 3).map(id => <Torrent
torrent={torrents[id]} torrent={torrents[id]}
files={_files[id] || []} files={_files[id] || []}
/>)} />)}
{selection.length > 3 ?
<p class="text-center text-muted">
<strong>
...{selection.length - 3} more hidden...
</strong>
</p>
: null}
</div> </div>
); );
} }