@@ -26,11 +26,12 @@ function timeAgo(iso?: string | null) {
|
||||
return `${days}d ago`;
|
||||
}
|
||||
|
||||
export default async function BuildBreakdownPage({
|
||||
params,
|
||||
}: {
|
||||
params: { buildId: string };
|
||||
}) {
|
||||
export default async function BuildBreakdownPage(
|
||||
props: {
|
||||
params: Promise<{ buildId: string }>;
|
||||
}
|
||||
) {
|
||||
const params = await props.params;
|
||||
// Public detail endpoint
|
||||
const res = await fetch(`${API_BASE_URL}/api/v1/builds/${params.buildId}`, {
|
||||
cache: "no-store",
|
||||
@@ -73,7 +74,6 @@ export default async function BuildBreakdownPage({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Layout */}
|
||||
<div className="mt-6 grid grid-cols-1 gap-6 lg:grid-cols-[1fr_320px]">
|
||||
{/* Post column */}
|
||||
@@ -168,11 +168,11 @@ export default async function BuildBreakdownPage({
|
||||
<div className="h-12 w-12 flex-none overflow-hidden rounded-md border border-zinc-800 bg-zinc-950">
|
||||
{it.productImageUrl ? (
|
||||
// eslint-disable-next-line @next/next/no-img-element
|
||||
<img
|
||||
(<img
|
||||
src={it.productImageUrl}
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user