fix: improve failed upload error handling

This commit is contained in:
Elias Schneider
2022-10-14 15:10:24 +02:00
parent 58efc48ffa
commit 1259922847
3 changed files with 21 additions and 8 deletions

View File

@@ -1,6 +1,5 @@
import { RingProgress } from "@mantine/core";
import { TbCircleCheck, TbCircleX } from "react-icons/tb";;
import { TbCircleCheck, TbCircleX } from "react-icons/tb";
const UploadProgressIndicator = ({ progress }: { progress: number }) => {
if (progress > 0 && progress < 100) {
return (
@@ -10,7 +9,7 @@ const UploadProgressIndicator = ({ progress }: { progress: number }) => {
size={25}
/>
);
} else if (progress == 100) {
} else if (progress >= 100) {
return <TbCircleCheck color="green" size={22} />;
} else {
return <TbCircleX color="red" size={22} />;