fix: fixing the bar

This commit is contained in:
Juan Di Toro 2024-03-29 00:28:44 +01:00
parent a58914a69a
commit 1118ba2a71
3 changed files with 4 additions and 2 deletions

View File

@ -285,6 +285,7 @@ const UploadFileItem = ({
failedState?: FailedUppyFile<Record<string, any>, Record<string, any>>;
onRemove: (id: string) => void;
}) => {
console.log({file: file.progress})
return (
<div className="flex flex-col w-full py-4 px-2 bg-primary-dark">
<div
@ -349,6 +350,7 @@ const UploadFileItem = ({
</div>
) : null}
{file.progress?.preprocess ? <p className="text-sm text-primary-2 ml-2">Processing...</p> : null}
{file.progress?.uploadStarted && !file.progress.uploadComplete ? (
<Progress max={100} value={file.progress.percentage} className="mt-2" />
) : null}

View File

@ -230,7 +230,7 @@ export function useUppy() {
});
}
setState("idle");
}, [targetRef, uploadLimit]);
}, [targetRef, invalidate, sdk, uploadLimit]);
useEffect(() => {
return () => {

View File

@ -10,7 +10,7 @@ const Progress = React.forwardRef<
<ProgressPrimitive.Root
ref={ref}
className={cn(
"relative h-4 w-full overflow-hidden rounded-full bg-primary",
"relative h-3 w-full overflow-hidden rounded-full bg-primary",
className
)}
{...props}