refactor
This commit is contained in:
parent
e13e814866
commit
4bffe92fa9
|
@ -27,13 +27,7 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ExportInProgress(props: Props) {
|
export default function ExportInProgress(props: Props) {
|
||||||
const progress =
|
const isLoading = props.exportProgress.total === 0;
|
||||||
props.exportProgress.total > 0
|
|
||||||
? Math.round(
|
|
||||||
(props.exportProgress.current * 100) /
|
|
||||||
props.exportProgress.total
|
|
||||||
)
|
|
||||||
: 100;
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
|
@ -56,7 +50,14 @@ export default function ExportInProgress(props: Props) {
|
||||||
<FlexWrapper px={1}>
|
<FlexWrapper px={1}>
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
now={progress}
|
now={
|
||||||
|
isLoading
|
||||||
|
? 100
|
||||||
|
: Math.round(
|
||||||
|
(props.exportProgress.current * 100) /
|
||||||
|
props.exportProgress.total
|
||||||
|
)
|
||||||
|
}
|
||||||
animated
|
animated
|
||||||
variant="upload-progress-bar"
|
variant="upload-progress-bar"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue