Show dish thumbnail in cart line items
The cart ('Tu pedido') line showed only name + price + quantity, no image. Render
the dish photo as a thumbnail (MediaThumb, with the plate-icon fallback when media
is missing or fails to load).
This commit is contained in:
1 parent
9fd28d6059
commit
7933e35fc3
1 file changed
+6
@@ -9,6 +9,7 @@ import BrandHeader from './BrandHeader';
|
||||
import DishCard from './DishCard';
|
||||
import ListRow from './ListRow';
|
||||
import Gallery from './Gallery';
|
||||
import MediaThumb from './MediaThumb';
|
||||
import AiConsultant from './AiConsultant';
|
||||
import SuggestionCarousel from './SuggestionCarousel';
|
||||
import SplitPanel, { type SplitSession } from './SplitPanel';
|
||||
@@ -565,6 +566,11 @@ function OrderPanel({
|
||||
{cart.map((l) => (
|
||||
<div key={l.product.id} className="glass-soft flex flex-col gap-2 rounded-2xl px-3 py-2">
|
||||
<div className="flex items-center gap-3">
|
||||
<MediaThumb
|
||||
media={[...l.product.media].sort((a, b) => a.order - b.order)[0]}
|
||||
alt={pickText(l.product.name, locale)}
|
||||
className="h-12 w-12 shrink-0 rounded-xl"
|
||||
/>
|
||||
<span className="min-w-0 flex-1 text-sm font-medium">
|
||||
{pickText(l.product.name, locale)}
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user