Run prettier formatter

This commit is contained in:
Brian Bowman
2022-07-19 04:37:38 -05:00
parent e9df0f17db
commit eb9aa34323
67 changed files with 1157 additions and 1071 deletions

View File

@@ -4,15 +4,15 @@ import Tr from '../../../utils/language'
import './ProgressBar.css'
interface IProps {
downloadManager: DownloadHandler,
downloadManager: DownloadHandler
}
interface IState {
average: number,
files: number,
extracting: number,
total: number,
speed: string,
average: number
files: number
extracting: number
total: number
speed: string
}
/**
@@ -29,7 +29,7 @@ export default class ProgressBar extends React.Component<IProps, IState> {
files,
extracting,
total: totalSize,
speed: '0 B/s'
speed: '0 B/s',
}
}
@@ -51,20 +51,23 @@ export default class ProgressBar extends React.Component<IProps, IState> {
return (
<div className="MainProgressBarWrapper">
<div className="ProgressBar">
<div className="InnerProgress" style={{
width: `${(() => {
// Handles no files downloading
if (this.state.files === 0) {
return '100'
}
<div
className="InnerProgress"
style={{
width: `${(() => {
// Handles no files downloading
if (this.state.files === 0) {
return '100'
}
if (this.state.total <= 0) {
return '0'
}
if (this.state.total <= 0) {
return '0'
}
return this.state.average
})()}%`,
}}></div>
return this.state.average
})()}%`,
}}
></div>
</div>
<div className="MainProgressText">
@@ -75,4 +78,4 @@ export default class ProgressBar extends React.Component<IProps, IState> {
</div>
)
}
}
}