diff --git a/src/client/components/GlobalItemCard.tsx b/src/client/components/GlobalItemCard.tsx index 7aa3944..6948155 100644 --- a/src/client/components/GlobalItemCard.tsx +++ b/src/client/components/GlobalItemCard.tsx @@ -1,5 +1,6 @@ import { Link } from "@tanstack/react-router"; import { useFormatters } from "../hooks/useFormatters"; +import { GearImage, imageContainerBg } from "./GearImage"; interface GlobalItemCardProps { id: number; @@ -9,6 +10,10 @@ interface GlobalItemCardProps { weightGrams: number | null; priceCents: number | null; imageUrl: string | null; + dominantColor?: string | null; + cropZoom?: number | null; + cropX?: number | null; + cropY?: number | null; } export function GlobalItemCard({ @@ -19,6 +24,10 @@ export function GlobalItemCard({ weightGrams, priceCents, imageUrl, + dominantColor, + cropZoom, + cropX, + cropY, }: GlobalItemCardProps) { const { weight, price } = useFormatters(); @@ -28,15 +37,25 @@ export function GlobalItemCard({ params={{ globalItemId: String(id) }} className="block bg-white rounded-xl border border-gray-100 hover:border-gray-200 hover:shadow-sm transition-all overflow-hidden group" > -
+
{imageUrl ? ( - {`${brand} ) : ( -
+
void; classification?: string; onClassificationCycle?: () => void; @@ -34,6 +39,10 @@ export function ItemCard({ imageUrl, productUrl, brand, + dominantColor, + cropZoom, + cropX, + cropY, onRemove, classification, onClassificationCycle, @@ -161,15 +170,25 @@ export function ItemCard({ )} -
+
{imageUrl ? ( - {name} ) : ( -
+