update conditional renderings
This commit is contained in:
parent
4a5b353b2b
commit
ef44b865ab
|
@ -32,10 +32,9 @@ export function UploadProgressDialog({
|
|||
fileCounter={props.fileCounter}
|
||||
now={props.now}
|
||||
/>
|
||||
<DialogContent
|
||||
sx={{
|
||||
'&&&': { px: 0 },
|
||||
}}>
|
||||
{(props.uploadStage === UPLOAD_STAGES.UPLOADING ||
|
||||
props.uploadStage === UPLOAD_STAGES.FINISH) && (
|
||||
<DialogContent>
|
||||
{props.uploadStage === UPLOAD_STAGES.UPLOADING && (
|
||||
<InProgressSection
|
||||
filenames={props.filenames}
|
||||
|
@ -90,7 +89,9 @@ export function UploadProgressDialog({
|
|||
sectionTitle={
|
||||
constants.LARGER_THAN_AVAILABLE_STORAGE_UPLOADS
|
||||
}
|
||||
sectionInfo={constants.LARGER_THAN_AVAILABLE_STORAGE_INFO}
|
||||
sectionInfo={
|
||||
constants.LARGER_THAN_AVAILABLE_STORAGE_INFO
|
||||
}
|
||||
/>
|
||||
<ResultSection
|
||||
filenames={props.filenames}
|
||||
|
@ -107,7 +108,7 @@ export function UploadProgressDialog({
|
|||
sectionInfo={constants.TOO_LARGE_INFO}
|
||||
/>
|
||||
</DialogContent>
|
||||
|
||||
)}
|
||||
{props.uploadStage === UPLOAD_STAGES.FINISH && (
|
||||
<UploadProgressFooter
|
||||
uploadStage={props.uploadStage}
|
||||
|
|
|
@ -19,11 +19,7 @@ export function UploadProgressHeader({
|
|||
handleHideModal={handleHideModal}
|
||||
fileCounter={fileCounter}
|
||||
/>
|
||||
<UploadProgressBar
|
||||
now={now}
|
||||
uploadStage={uploadStage}
|
||||
expanded={expanded}
|
||||
/>
|
||||
<UploadProgressBar now={now} uploadStage={uploadStage} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,12 +2,13 @@ import React from 'react';
|
|||
import { LinearProgress, Divider, Box } from '@mui/material';
|
||||
import { UPLOAD_STAGES } from 'constants/upload';
|
||||
|
||||
export function UploadProgressBar({ uploadStage, now, expanded }) {
|
||||
export function UploadProgressBar({ uploadStage, now }) {
|
||||
return (
|
||||
<Box mb={expanded ? 2 : 0}>
|
||||
<Box>
|
||||
{(uploadStage === UPLOAD_STAGES.READING_GOOGLE_METADATA_FILES ||
|
||||
uploadStage === UPLOAD_STAGES.EXTRACTING_METADATA ||
|
||||
uploadStage === UPLOAD_STAGES.UPLOADING) && (
|
||||
<>
|
||||
<LinearProgress
|
||||
sx={{
|
||||
height: '2px',
|
||||
|
@ -16,8 +17,9 @@ export function UploadProgressBar({ uploadStage, now, expanded }) {
|
|||
variant="determinate"
|
||||
value={now}
|
||||
/>
|
||||
)}
|
||||
<Divider />
|
||||
</>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue