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

View File

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

View File

@ -10,7 +10,7 @@ const Progress = React.forwardRef<
<ProgressPrimitive.Root <ProgressPrimitive.Root
ref={ref} ref={ref}
className={cn( 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 className
)} )}
{...props} {...props}