From 8cf6ca8cb588d5ab92547acf7489578ee199ba3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorem=20Ju=C3=A1rez?= Date: Fri, 26 Jun 2026 18:33:59 -0600 Subject: [PATCH] Show dish thumbnails in AI consultant recommendations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The consultant cards (both direct recommendations and the 'Para acompaƱar' complements) showed only name + reason. Each card already resolves the real product for its Add button, so render its photo as a thumbnail (MediaThumb, which falls back to the plate icon when media is missing or fails to load). --- src/components/public/AiConsultant.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/public/AiConsultant.tsx b/src/components/public/AiConsultant.tsx index 2772941..0226915 100644 --- a/src/components/public/AiConsultant.tsx +++ b/src/components/public/AiConsultant.tsx @@ -4,6 +4,7 @@ import { useMemo, useState } from 'react'; import { useLocale, useTranslations } from 'next-intl'; import type { SnapshotProduct } from '@/lib/types'; import SuggestionCarousel from './SuggestionCarousel'; +import MediaThumb from './MediaThumb'; type Recommendation = { dish: string; reason: string; type?: 'direct' | 'complement' }; @@ -63,8 +64,16 @@ export default function AiConsultant({ function Card(r: Recommendation, key: number) { const product = resolveDish(r.dish); + const cover = product ? [...product.media].sort((a, b) => a.order - b.order)[0] : undefined; return (
+ {product && ( + + )}
{r.dish}

{r.reason}