feat: use ProductImage in PartsGrid list view

This commit is contained in:
2026-03-29 07:37:44 -04:00
parent 00613ebc9f
commit b8a0fd1963
+7 -11
View File
@@ -3,6 +3,7 @@
import Link from "next/link";
import { Plus } from "lucide-react";
import type { UiPart } from "@/types/uiPart";
import { ProductImage } from './ProductImage';
export default function PartsGrid(props: {
viewMode: "card" | "list";
@@ -130,17 +131,12 @@ export default function PartsGrid(props: {
>
{/* Image */}
<div className="hidden md:block justify-self-start">
{part.imageUrl ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={part.imageUrl}
alt=""
className="h-10 w-10 rounded object-cover border border-zinc-800 bg-zinc-950"
loading="lazy"
/>
) : (
<div className="h-10 w-10 rounded border border-zinc-800 bg-zinc-950" />
)}
<ProductImage
src={part.imageUrl}
alt=""
className="h-10 w-10 rounded object-cover border border-zinc-800 bg-zinc-950"
loading="lazy"
/>
</div>
{/* Part */}