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 Link from "next/link";
import { Plus } from "lucide-react"; import { Plus } from "lucide-react";
import type { UiPart } from "@/types/uiPart"; import type { UiPart } from "@/types/uiPart";
import { ProductImage } from './ProductImage';
export default function PartsGrid(props: { export default function PartsGrid(props: {
viewMode: "card" | "list"; viewMode: "card" | "list";
@@ -130,17 +131,12 @@ export default function PartsGrid(props: {
> >
{/* Image */} {/* Image */}
<div className="hidden md:block justify-self-start"> <div className="hidden md:block justify-self-start">
{part.imageUrl ? ( <ProductImage
// eslint-disable-next-line @next/next/no-img-element src={part.imageUrl}
<img alt=""
src={part.imageUrl} className="h-10 w-10 rounded object-cover border border-zinc-800 bg-zinc-950"
alt="" loading="lazy"
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" />
)}
</div> </div>
{/* Part */} {/* Part */}