feat: use ProductImage for part thumbnails on build detail page
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// app/builds/[buildId]/page.tsx
|
// app/builds/[buildId]/page.tsx
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
import { ProductImage } from "@/components/parts/ProductImage";
|
||||||
|
|
||||||
const API_BASE_URL =
|
const API_BASE_URL =
|
||||||
process.env.NEXT_PUBLIC_API_BASE_URL ?? "";
|
process.env.NEXT_PUBLIC_API_BASE_URL ?? "";
|
||||||
@@ -169,18 +170,11 @@ export default async function BuildBreakdownPage({
|
|||||||
>
|
>
|
||||||
{/* Thumb */}
|
{/* Thumb */}
|
||||||
<div className="h-12 w-12 flex-none overflow-hidden rounded-md border border-zinc-800 bg-zinc-950">
|
<div className="h-12 w-12 flex-none overflow-hidden rounded-md border border-zinc-800 bg-zinc-950">
|
||||||
{it.productImageUrl ? (
|
<ProductImage
|
||||||
// eslint-disable-next-line @next/next/no-img-element
|
src={it.productImageUrl}
|
||||||
<img
|
alt={it.productName ?? "Part image"}
|
||||||
src={it.productImageUrl}
|
className="h-full w-full object-cover"
|
||||||
alt={it.productName ?? "Part image"}
|
/>
|
||||||
className="h-full w-full object-cover"
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<div className="flex h-full w-full items-center justify-center text-[10px] text-zinc-600">
|
|
||||||
IMG
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Info */}
|
{/* Info */}
|
||||||
|
|||||||
Reference in New Issue
Block a user