{props.list.Name}
-{props.list.Images.length}
- - ); +export const StackCard: Component<{ list: List }> = (props) => { + return ( + +{props.list.Name}
+{props.list.Images.length}
+ + ); }; diff --git a/frontend/src/contexts/Notifications.tsx b/frontend/src/contexts/Notifications.tsx index 02b50d5..d7ea796 100644 --- a/frontend/src/contexts/Notifications.tsx +++ b/frontend/src/contexts/Notifications.tsx @@ -34,7 +34,7 @@ export const Notifications = (onCompleteImage: () => void) => { ProcessingLists: {}, }); - const { processingImages } = useSearchImageContext(); + const { userImages } = useSearchImageContext(); const [accessToken] = createResource(getAccessToken); @@ -91,19 +91,19 @@ export const Notifications = (onCompleteImage: () => void) => { }; createEffect(() => { - const images = processingImages(); + const images = userImages(); if (images == null) { return; } upsertImageProcessing( Object.fromEntries( - images.map((i) => [ - i.ImageID, + images.filter(i => i.Status !== 'complete').map((i) => [ + i.ID, { Type: "image", - ImageID: i.ImageID, - ImageName: i.Image.ImageName, + ImageID: i.ID, + ImageName: i.ImageName, Status: i.Status, }, ]), diff --git a/frontend/src/contexts/SearchImageContext.tsx b/frontend/src/contexts/SearchImageContext.tsx index e6d87ac..7f122d9 100644 --- a/frontend/src/contexts/SearchImageContext.tsx +++ b/frontend/src/contexts/SearchImageContext.tsx @@ -14,14 +14,10 @@ export type SearchImageStore = { Array<{ date: Date; images: JustTheImageWhatAreTheseNames }> >; - lists: Accessor