fix(web): update search, listing, and map components
Improve agent profile client, comparison table, image gallery/upload, listing map, filter bar, property card, and search results components with better error handling, type safety, and UX refinements. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -198,7 +198,7 @@ export function ListingMap({ listings, onMarkerClick, selectedListingId, classNa
|
||||
function showPopup(map: mapboxgl.Map, marker: MapMarker) {
|
||||
popupRef.current?.remove();
|
||||
|
||||
const popup = new mapboxgl.Popup({ offset: 25, maxWidth: '260px', closeButton: true })
|
||||
const popup = new mapboxgl.Popup({ offset: 25, maxWidth: 'min(260px, 85vw)', closeButton: true })
|
||||
.setLngLat([marker.lng, marker.lat])
|
||||
.setDOMContent(buildPopupContent(marker.listing))
|
||||
.addTo(map);
|
||||
@@ -209,7 +209,7 @@ export function ListingMap({ listings, onMarkerClick, selectedListingId, classNa
|
||||
const hasToken = typeof process !== 'undefined' && process.env['NEXT_PUBLIC_MAPBOX_TOKEN'];
|
||||
|
||||
return (
|
||||
<div className={`relative overflow-hidden rounded-lg border ${className || 'h-[500px]'}`}>
|
||||
<div className={`relative overflow-hidden rounded-lg border ${className || 'h-[300px] md:h-[500px]'}`}>
|
||||
<div ref={mapContainerRef} className="h-full w-full" />
|
||||
|
||||
{/* Fallback when no Mapbox token */}
|
||||
|
||||
Reference in New Issue
Block a user