feat(17-03): update client components to use imageUrl from API responses

- Replace all /uploads/ path construction with imageUrl presigned URLs
- Add imageUrl prop to ItemCard, CandidateCard, CandidateListItem, ComparisonTable
- Update ImageUpload to use presigned URLs + local preview for new uploads
- Pass imageUrl through from parent components (CollectionView, forms, routes)
This commit is contained in:
2026-04-05 12:27:34 +02:00
parent 2d31680072
commit 8c64bf9fbf
10 changed files with 42 additions and 11 deletions

View File

@@ -13,6 +13,7 @@ interface ItemCardProps {
categoryName: string;
categoryIcon: string;
imageFilename: string | null;
imageUrl?: string | null;
productUrl?: string | null;
onRemove?: () => void;
classification?: string;
@@ -28,6 +29,7 @@ export function ItemCard({
categoryName,
categoryIcon,
imageFilename,
imageUrl,
productUrl,
onRemove,
classification,
@@ -149,9 +151,9 @@ export function ItemCard({
</span>
)}
<div className="aspect-[4/3] bg-gray-50">
{imageFilename ? (
{imageUrl ? (
<img
src={`/uploads/${imageFilename}`}
src={imageUrl}
alt={name}
className="w-full h-full object-cover"
/>