feat: show in progress upload in upload btn

This commit is contained in:
2025-10-12 17:09:42 +00:00
parent 0c7e4c43e7
commit b17de812b9
3 changed files with 33 additions and 46 deletions

View File

@@ -26,6 +26,8 @@ export const clearFileUploadAtom = atom(null, (get, set, id: string) => {
set(fileUploadsAtom, fileUploads)
})
export const hasFileUploadsAtom = atom(
(get) => Object.keys(get(fileUploadsAtom)).length > 0,
export const fileUploadCountAtom = atom(
(get) => Object.keys(get(fileUploadsAtom)).length,
)
export const hasFileUploadsAtom = atom((get) => get(fileUploadCountAtom) > 0)