This commit is contained in:
Abhinav 2023-03-28 18:23:55 +05:30
parent e13e814866
commit 4bffe92fa9

View file

@ -27,13 +27,7 @@ interface Props {
}
export default function ExportInProgress(props: Props) {
const progress =
props.exportProgress.total > 0
? Math.round(
(props.exportProgress.current * 100) /
props.exportProgress.total
)
: 100;
const isLoading = props.exportProgress.total === 0;
return (
<>
<DialogContent>
@ -56,7 +50,14 @@ export default function ExportInProgress(props: Props) {
<FlexWrapper px={1}>
<ProgressBar
style={{ width: '100%' }}
now={progress}
now={
isLoading
? 100
: Math.round(
(props.exportProgress.current * 100) /
props.exportProgress.total
)
}
animated
variant="upload-progress-bar"
/>