feat: use ProductImage in PartsGrid list view
This commit is contained in:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user