feat: show menu item photo thumbnail in admin list
This commit is contained in:
@@ -1484,6 +1484,17 @@ function MenuSection({ items, setItems, images, onToast }: any) {
|
|||||||
background: C.navy, color: '#fff', flexShrink: 0,
|
background: C.navy, color: '#fff', flexShrink: 0,
|
||||||
}}>{item.category}</span>
|
}}>{item.category}</span>
|
||||||
|
|
||||||
|
{/* Photo thumbnail */}
|
||||||
|
{(item.photos && item.photos.length > 0) && (
|
||||||
|
<div style={{ width: 40, height: 30, borderRadius: 6, overflow: 'hidden', flexShrink: 0, border: `1px solid ${C.border}` }}>
|
||||||
|
<img
|
||||||
|
src={item.featured_photo || item.photos[0]}
|
||||||
|
alt=""
|
||||||
|
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Name & Description */}
|
{/* Name & Description */}
|
||||||
<div style={{ flex: 1, minWidth: 0 }}>
|
<div style={{ flex: 1, minWidth: 0 }}>
|
||||||
<div style={{ fontWeight: 600, color: C.navy, fontSize: '14px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
<div style={{ fontWeight: 600, color: C.navy, fontSize: '14px', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
||||||
|
|||||||
Reference in New Issue
Block a user