fix: progress bar not being rendered due to progress not being tracked
This commit is contained in:
parent
6b097e0860
commit
a58914a69a
|
@ -19,6 +19,7 @@ import type { S5Client, HashProgressEvent } from "@lumeweb/s5-js";
|
|||
import { useInvalidate } from "@refinedev/core";
|
||||
|
||||
const LISTENING_EVENTS = [
|
||||
"upload-progress",
|
||||
"upload",
|
||||
"upload-success",
|
||||
"upload-error",
|
||||
|
@ -208,11 +209,15 @@ export function useUppy() {
|
|||
const setStateCb = (event: (typeof LISTENING_EVENTS)[number]) => {
|
||||
switch (event) {
|
||||
case "upload":
|
||||
case "upload-progress":
|
||||
setState("uploading");
|
||||
break;
|
||||
case "upload-error":
|
||||
setState("error");
|
||||
break;
|
||||
case "upload-success":
|
||||
setState("completed");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue