Skip to content

Commit

Permalink
fix: initial pic status
Browse files Browse the repository at this point in the history
  • Loading branch information
ledouxm committed Oct 22, 2024
1 parent 629c9ce commit 4ab687c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/features/InfoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,12 @@ const PictureThumbnail = ({ picture, index, status }: { picture: Pictures; index
queryKey: ["picture-status", picture.id],
queryFn: async () => {
const status = await get(picture.id, getUploadStatusStore());
return status;
return status ?? null;
},
enabled: !status,
});

const finalStatus = status ?? idbStatusQuery.data ?? "success";
const finalStatus = picture.url ? "success" : status ?? idbStatusQuery.data ?? "uploading";

const bgUrl = bgUrlQuery.data;

Expand Down

0 comments on commit 4ab687c

Please sign in to comment.