diff --git a/src/client/components/CatalogSearchOverlay.tsx b/src/client/components/CatalogSearchOverlay.tsx index 678e651..8d39a14 100644 --- a/src/client/components/CatalogSearchOverlay.tsx +++ b/src/client/components/CatalogSearchOverlay.tsx @@ -7,6 +7,7 @@ import { useFormatters } from "../hooks/useFormatters"; import { useGlobalItems } from "../hooks/useGlobalItems"; import { useTags } from "../hooks/useTags"; import { useUIStore } from "../stores/uiStore"; +import { GearImage } from "./GearImage"; import { ManualEntryForm } from "./ManualEntryForm"; type ViewMode = "grid" | "list"; @@ -626,15 +627,21 @@ function GridCard({ item, onAdd, onCardClick, weight, price }: CardProps) { className="bg-white rounded-xl border border-gray-100 overflow-hidden cursor-pointer hover:border-gray-200 hover:shadow-sm transition-all" onClick={onCardClick} > -
+
).dominantColor as string) || "#f3f4f6" + : undefined, + }} + > {item.imageUrl ? ( - {`${item.brand} ) : ( -
+
{/* Thumbnail */} -
+
).dominantColor as string) || "#f3f4f6" + : undefined, + }} + > {item.imageUrl ? ( - {`${item.brand} ) : ( -
+
( -
+
).dominantColor as string) || "#f3f4f6" + : undefined, + }} + > {c.imageUrl ? ( - {c.name} ) : ( void; } @@ -13,6 +15,7 @@ const ACCEPTED_TYPES = ["image/jpeg", "image/png", "image/webp"]; export function ImageUpload({ value: _value, imageUrl, + dominantColor, onChange, }: ImageUploadProps) { const [uploading, setUploading] = useState(false); @@ -70,13 +73,18 @@ export function ImageUpload({
inputRef.current?.click()} className="relative w-full aspect-[4/3] rounded-xl overflow-hidden cursor-pointer group" + style={{ + backgroundColor: displayUrl + ? imageContainerBg(dominantColor) + : undefined, + }} > {displayUrl ? ( <> - Item {/* Remove button */}