fix: image above map stacked vertically in PropertyDetailView (160px + 120px)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Benjamin Sutter
2026-05-18 21:35:36 +02:00
parent a75818b983
commit 5391ad0ae5
+18 -22
View File
@@ -366,28 +366,24 @@ export function PropertyDetailView({ propertyId, onClose }: PropertyDetailViewPr
)} )}
</Box> </Box>
{/* Photo + Map — side by side, compact */} {/* Photo + Map — stacked, compact */}
{(property.images?.[0] || property.location.coordinates) && ( {property.images?.[0] && (
<Box sx={{ display: 'flex', flexShrink: 0, height: 140, borderBottom: '1px solid #e2e8f0' }}> <Box sx={{ flexShrink: 0, height: 160, overflow: 'hidden' }}>
{property.images?.[0] && ( <img
<Box sx={{ flex: property.location.coordinates ? '0 0 55%' : 1, overflow: 'hidden' }}> src={property.images[0]}
<img alt={property.title}
src={property.images[0]} style={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }}
alt={property.title} />
style={{ width: '100%', height: '100%', objectFit: 'cover', display: 'block' }} </Box>
/> )}
</Box> {property.location.coordinates && (
)} <Box sx={{ flexShrink: 0, borderBottom: '1px solid #e2e8f0' }}>
{property.location.coordinates && ( <PropertyMap
<Box sx={{ flex: 1, overflow: 'hidden' }}> lat={property.location.coordinates.lat}
<PropertyMap lng={property.location.coordinates.lng}
lat={property.location.coordinates.lat} label={property.title}
lng={property.location.coordinates.lng} height={120}
label={property.title} />
height={140}
/>
</Box>
)}
</Box> </Box>
)} )}