diff --git a/src/pages/gallery/components/CollectionDropZone.tsx b/src/pages/gallery/components/CollectionDropZone.tsx index 434f25f26..6bfd29e1c 100644 --- a/src/pages/gallery/components/CollectionDropZone.tsx +++ b/src/pages/gallery/components/CollectionDropZone.tsx @@ -33,8 +33,6 @@ function CollectionDropZone({ if (err.response) { setBannerErrorCode(err.response.status); } - } finally { - setProgressView(false); } }; return ( diff --git a/src/pages/gallery/components/CreateCollection.tsx b/src/pages/gallery/components/CreateCollection.tsx index 5ce90da16..7f8a6b0ca 100644 --- a/src/pages/gallery/components/CreateCollection.tsx +++ b/src/pages/gallery/components/CreateCollection.tsx @@ -76,8 +76,6 @@ export default function CreateCollection(props) { if (err.response) { setBannerErrorCode(err.response.status); } - } finally { - setProgressView(false); } }; return ( diff --git a/src/pages/gallery/components/Upload.tsx b/src/pages/gallery/components/Upload.tsx index 3d0b8bb08..b591e4d61 100644 --- a/src/pages/gallery/components/Upload.tsx +++ b/src/pages/gallery/components/Upload.tsx @@ -35,6 +35,7 @@ export default function Upload(props) { uploadStage={uploadStage} uploadErrors={uploadErrors} show={progressView} + closeModal={() => setProgressView(false)} onHide={init} /> diff --git a/src/pages/gallery/components/UploadProgress.tsx b/src/pages/gallery/components/UploadProgress.tsx index 6c37365bd..7f08714ba 100644 --- a/src/pages/gallery/components/UploadProgress.tsx +++ b/src/pages/gallery/components/UploadProgress.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Alert, Modal, ProgressBar } from 'react-bootstrap'; +import { Alert, Button, Modal, ProgressBar } from 'react-bootstrap'; import constants from 'utils/strings/constants'; export default function UploadProgress({ @@ -7,6 +7,7 @@ export default function UploadProgress({ uploadStage, now, uploadErrors, + closeModal, ...props }) { return ( @@ -36,19 +37,32 @@ export default function UploadProgress({ )} - {uploadErrors.length && ( - -
0 && ( + <> + +
+ {uploadErrors.map((error) => ( +
  • {error.message}
  • + ))} +
    +
    + + )} + {now === 100 && ( + +
    -
    + {constants.CLOSE} + + )}