mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-03 14:03:40 +01:00
Fix linting errors
This commit is contained in:
parent
7266390491
commit
bec62a0949
@ -27,19 +27,19 @@ export default function Component({ service }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { torrents } = torrentData;
|
const { torrents } = torrentData;
|
||||||
let count = 0;
|
const keys = Object.keys(torrents);
|
||||||
|
|
||||||
let rateDl = 0;
|
let rateDl = 0;
|
||||||
let rateUl = 0;
|
let rateUl = 0;
|
||||||
let completed = 0;
|
let completed = 0;
|
||||||
for (const key of Object.keys(torrents)) {
|
for (let i = 0; i < keys.length; i += 1) {
|
||||||
const torrent = torrents[key];
|
const torrent = torrents[keys[i]];
|
||||||
count += 1;
|
|
||||||
rateDl += torrent.download_payload_rate;
|
rateDl += torrent.download_payload_rate;
|
||||||
rateUl += torrent.upload_payload_rate;
|
rateUl += torrent.upload_payload_rate;
|
||||||
completed += torrent.total_remaining === 0 ? 1 : 0;
|
completed += torrent.total_remaining === 0 ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const leech = count - completed || 0;
|
const leech = keys.length - completed || 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user