Show brand/model images on the public vehicle-select pages
image_path was stored correctly since the brand/model image feature was added, but VehicleSelect.jsx and BrandPage.jsx rendered cards as plain text links and never read the column. Falls back to the existing text-only look when no image is set. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
1b60b71ecd
commit
9f5919eb45
4 changed files with 10 additions and 4 deletions
|
|
@ -59,8 +59,11 @@ export default function BrandPage() {
|
|||
<Link
|
||||
key={model.id}
|
||||
to={`/fahrzeuge/${brandSlug}/${model.slug}`}
|
||||
className="flex items-center justify-center rounded-xl border border-neutral-200 bg-white px-6 py-8 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100"
|
||||
className="flex flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 py-8 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100"
|
||||
>
|
||||
{model.image_path && (
|
||||
<img src={model.image_path} alt="" className="h-16 w-full object-contain" />
|
||||
)}
|
||||
{model.name}
|
||||
</Link>
|
||||
))}
|
||||
|
|
|
|||
|
|
@ -47,8 +47,11 @@ export default function VehicleSelect() {
|
|||
<Link
|
||||
key={brand.id}
|
||||
to={`/fahrzeuge/${brand.slug}`}
|
||||
className="flex items-center justify-center rounded-xl border border-neutral-200 bg-white px-6 py-8 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100"
|
||||
className="flex flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 py-8 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100"
|
||||
>
|
||||
{brand.image_path && (
|
||||
<img src={brand.image_path} alt="" className="h-16 w-full object-contain" />
|
||||
)}
|
||||
{brand.name}
|
||||
</Link>
|
||||
))}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -43,7 +43,7 @@
|
|||
"sameAs": ["https://www.youtube.com/@hifiplanet2812"]
|
||||
}
|
||||
</script>
|
||||
<script type="module" crossorigin src="/assets/index-B_Zex33k.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CWyHp-JT.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/lucide-icons-Cg2IxtAO.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B1rtregG.css">
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Reference in a new issue