render conditionally on uploadStage rather than progress percent
This commit is contained in:
parent
9f0584a58f
commit
c107995d55
|
@ -52,7 +52,7 @@ export default function UploadProgress(props: Props) {
|
||||||
</h4>
|
</h4>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<Modal.Body>
|
<Modal.Body>
|
||||||
{props.now === 100 ? (
|
{props.uploadStage===UPLOAD_STAGES.FINISH ? (
|
||||||
fileProgressStatuses.length !== 0 && (
|
fileProgressStatuses.length !== 0 && (
|
||||||
<Alert variant="warning">
|
<Alert variant="warning">
|
||||||
{constants.FAILED_UPLOAD_FILE_LIST}
|
{constants.FAILED_UPLOAD_FILE_LIST}
|
||||||
|
@ -78,7 +78,7 @@ export default function UploadProgress(props: Props) {
|
||||||
>
|
>
|
||||||
{fileProgressStatuses.map(({ fileName, progress }) => (
|
{fileProgressStatuses.map(({ fileName, progress }) => (
|
||||||
<li key={fileName} style={{ marginTop: '12px' }}>
|
<li key={fileName} style={{ marginTop: '12px' }}>
|
||||||
{props.now === 100 ?
|
{props.uploadStage===UPLOAD_STAGES.FINISH ?
|
||||||
fileName :
|
fileName :
|
||||||
constants.FILE_UPLOAD_PROGRESS(
|
constants.FILE_UPLOAD_PROGRESS(
|
||||||
fileName,
|
fileName,
|
||||||
|
@ -90,7 +90,7 @@ export default function UploadProgress(props: Props) {
|
||||||
)}
|
)}
|
||||||
{props.uploadStage === UPLOAD_STAGES.FINISH && (
|
{props.uploadStage === UPLOAD_STAGES.FINISH && (
|
||||||
<Modal.Footer style={{ border: 'none' }}>
|
<Modal.Footer style={{ border: 'none' }}>
|
||||||
{props.now === 100 && (fileProgressStatuses?.length === 0 ? (
|
{props.uploadStage===UPLOAD_STAGES.FINISH && (fileProgressStatuses?.length === 0 ? (
|
||||||
<Button
|
<Button
|
||||||
variant="outline-secondary"
|
variant="outline-secondary"
|
||||||
style={{ width: '100%' }}
|
style={{ width: '100%' }}
|
||||||
|
|
Loading…
Reference in a new issue