moved closing progressbar logic to finally block

This commit is contained in:
Abhinav-grd 2021-02-02 18:27:35 +05:30
parent 60fb583598
commit 121e3696d7

View file

@ -43,12 +43,15 @@ export default function CreateCollection(props) {
await UploadService.uploadFiles(acceptedFiles, collectionLatestFile, token, progressBarProps);
refetchData();
setProgressView(false);
}
catch (err) {
if (err.response)
setErrorCode(err.response.status);
}
finally {
setProgressView(false);
}
}
return (
<Modal