fix: cannot upload if there are no files

This commit is contained in:
Juan Di Toro 2024-03-28 10:04:31 +01:00
parent 810948242f
commit 10610db63e
1 changed files with 1 additions and 5 deletions

View File

@ -257,7 +257,7 @@ const UploadFileForm = () => {
) : null}
{!hasStarted && !isCompleted && !isUploading ? (
<Button size={"lg"} className="mt-6" onClick={upload}>
<Button size={"lg"} className="mt-6" onClick={upload} disabled={getFiles().length === 0}>
Upload
</Button>
) : null}
@ -265,10 +265,6 @@ const UploadFileForm = () => {
);
};
function bytestoMegabytes(bytes: number) {
return bytes / 1024 / 1024;
}
const UploadFileItem = ({
file,
failedState,