From 72257a39750c8cf29dae9968d02a8662327c30c9 Mon Sep 17 00:00:00 2001 From: RawToast225 Date: Sun, 19 Nov 2023 03:08:38 -0700 Subject: [PATCH] style change to be compliant --- .../DownloadManager/components/ProgressHeader/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/frontend/screens/DownloadManager/components/ProgressHeader/index.tsx b/src/frontend/screens/DownloadManager/components/ProgressHeader/index.tsx index 3c151a7deb..a4ae1d7c48 100644 --- a/src/frontend/screens/DownloadManager/components/ProgressHeader/index.tsx +++ b/src/frontend/screens/DownloadManager/components/ProgressHeader/index.tsx @@ -11,8 +11,6 @@ interface Point { disk: number } -const sampleSize: number = 100; - const roundToNearestHundredth = function (val: number | undefined) { if (!val) return 0 return Math.round(val * 100) / 100 @@ -22,6 +20,7 @@ export default function ProgressHeader(props: { appName: string state: DownloadManagerState }) { + const sampleSize = 100 const { t } = useTranslation() const [progress] = hasProgress(props.appName) const [avgSpeed, setAvgDownloadSpeed] = useState( @@ -30,7 +29,9 @@ export default function ProgressHeader(props: { useEffect(() => { if (props.state === 'idle') { - setAvgDownloadSpeed(Array(sampleSize).fill({ download: 0, disk: 0 })) + setAvgDownloadSpeed( + Array(sampleSize).fill({ download: 0, disk: 0 }) + ) return }