From 98eaee123430a9cc244407bbdd86c4497100ebe3 Mon Sep 17 00:00:00 2001 From: Larvey <39219859+LarveyOfficial@users.noreply.github.com> Date: Sun, 12 Jun 2022 01:15:38 -0400 Subject: [PATCH] Use humanFileSize --- src/components/modules/downloads/DownloadsModule.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/modules/downloads/DownloadsModule.tsx b/src/components/modules/downloads/DownloadsModule.tsx index accbf4033..2062b5fb5 100644 --- a/src/components/modules/downloads/DownloadsModule.tsx +++ b/src/components/modules/downloads/DownloadsModule.tsx @@ -19,6 +19,7 @@ import { useConfig } from '../../../tools/state'; import { AddItemShelfButton } from '../../AppShelf/AddAppShelfItem'; import { useSetSafeInterval } from '../../../tools/hooks/useSetSafeInterval'; import { useViewportSize } from '@mantine/hooks'; +import { humanFileSize } from '../../../tools/humanFileSize'; export const DownloadsModule: IModule = { title: 'Torrent', @@ -100,7 +101,7 @@ export default function DownloadComponent() { .map((torrent) => { const downloadSpeed = torrent.downloadSpeed / 1024 / 1024; const uploadSpeed = torrent.uploadSpeed / 1024 / 1024; - const size = torrent.totalSelected / (1024 * 1024); + const size = torrent.totalSelected; // Convert Seconds to readable format. function calculateETA(givenSeconds: number) { if (givenSeconds > 86399) { // No @@ -140,7 +141,7 @@ export default function DownloadComponent() {