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:
@@ -14,6 +14,7 @@ interface CandidateCardProps {
|
||||
categoryName: string;
|
||||
categoryIcon: string;
|
||||
imageFilename: string | null;
|
||||
imageUrl?: string | null;
|
||||
productUrl?: string | null;
|
||||
threadId: number;
|
||||
isActive: boolean;
|
||||
@@ -33,6 +34,7 @@ export function CandidateCard({
|
||||
categoryName,
|
||||
categoryIcon,
|
||||
imageFilename,
|
||||
imageUrl,
|
||||
productUrl,
|
||||
threadId,
|
||||
isActive,
|
||||
@@ -142,9 +144,9 @@ export function CandidateCard({
|
||||
</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"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user