Skip to content

Commit

Permalink
style change to be compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
RawToast225 committed Nov 19, 2023
1 parent 76cdf59 commit 72257a3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<Point[]>(
Expand All @@ -30,7 +29,9 @@ export default function ProgressHeader(props: {

useEffect(() => {
if (props.state === 'idle') {
setAvgDownloadSpeed(Array<Point>(sampleSize).fill({ download: 0, disk: 0 }))
setAvgDownloadSpeed(
Array<Point>(sampleSize).fill({ download: 0, disk: 0 })
)
return
}

Expand Down

0 comments on commit 72257a3

Please sign in to comment.