fix(tecdoc): only surface publicly-resolvable part images

The snapshot stores scrape-local '/_debug/...' image paths that 404
off-host. Filter the OEM lookup to http(s) image URLs and render the
thumbnail only when one exists, so the detail page shows clean
code-focused cards instead of a grid of broken-image placeholders.
Real CDN URLs will surface automatically once present.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 21:00:12 +03:00
parent eae373c553
commit 24e44a49f8
2 changed files with 9 additions and 2 deletions

View File

@@ -198,7 +198,9 @@ function OemDetailPage() {
key={a.id}
className="flex gap-3 rounded-xl border border-border bg-background p-3"
>
<PartThumb src={a.images[0]?.thumb ?? a.images[0]?.url ?? null} alt={a.brand} />
{a.images[0] && (
<PartThumb src={a.images[0].thumb ?? a.images[0].url} alt={a.brand} />
)}
<div className="min-w-0 flex-1">
<p className="truncate text-sm font-semibold">{a.brand}</p>
<CopyCode code={a.articleNumber} className="mt-0.5" />