diff --git a/src/components/modules/downloads/DownloadsModule.tsx b/src/components/modules/downloads/DownloadsModule.tsx index e8d7b9d1b..84a013955 100644 --- a/src/components/modules/downloads/DownloadsModule.tsx +++ b/src/components/modules/downloads/DownloadsModule.tsx @@ -91,45 +91,44 @@ export default function DownloadComponent() { ); // Loop over qBittorrent torrents merging with deluge torrents - const rows = torrents.map((torrent) => { - if (torrent.progress === 1 && hideComplete) { - return []; - } - const downloadSpeed = torrent.downloadSpeed / 1024 / 1024; - const uploadSpeed = torrent.uploadSpeed / 1024 / 1024; - return ( - - - - - {torrent.name} - - - - - {downloadSpeed > 0 ? `${downloadSpeed.toFixed(1)} Mb/s` : '-'} - - - {uploadSpeed > 0 ? `${uploadSpeed.toFixed(1)} Mb/s` : '-'} - - - {(torrent.progress * 100).toFixed(1)}% - - - - ); - }); + const rows = torrents + .filter((torrent) => !(torrent.progress === 1 && hideComplete)) + .map((torrent) => { + const downloadSpeed = torrent.downloadSpeed / 1024 / 1024; + const uploadSpeed = torrent.uploadSpeed / 1024 / 1024; + return ( + + + + + {torrent.name} + + + + + {downloadSpeed > 0 ? `${downloadSpeed.toFixed(1)} Mb/s` : '-'} + + + {uploadSpeed > 0 ? `${uploadSpeed.toFixed(1)} Mb/s` : '-'} + + + {(torrent.progress * 100).toFixed(1)}% + + + + ); + }); const easteregg = (