diff --git a/src/webapp/components/AddToCollectionModal.tsx b/src/webapp/components/AddToCollectionModal.tsx index bb16e173..89ad8879 100644 --- a/src/webapp/components/AddToCollectionModal.tsx +++ b/src/webapp/components/AddToCollectionModal.tsx @@ -163,7 +163,7 @@ export function AddToCollectionModal({ > {submitting ? 'Adding...' - : `Add to ${selectedCollectionIds.length} Collection${selectedCollectionIds.length !== 1 ? 's' : ''}`} + : `Add to ${selectedCollectionIds.length} Collection${selectedCollectionIds.length !== 1 && 's'}`} + + {searchedCollections.isPending && ( + + + Searching collections... + + + + )} + + {searchedCollections.data && + (searchedCollections.data.collections.length === 0 ? ( + + ) : ( + renderCollectionItems( + searchedCollections.data.collections, + ) + ))} + + ) : hasCollections ? ( + renderCollectionItems(allCollections) + ) : ( + + + No collections + + + + )} + + + + + + + + {hasSelectedCollections ? ( + renderCollectionItems(selectedCollections) + ) : ( + + )} + + + + + + + + {hasSelectedCollections && ( + + )} + + + + + + + ); +}