@@ -15,13 +15,13 @@ const PropertyCard = ({ property }) => {
1515 const imageData = mainImage ?. asset ?. gatsbyImageData
1616
1717 // Format location string from location object
18- const locationString = location ?. city ?
19- `${ location . city } ${ location . state ? `, ${ location . state } ` : '' } ` :
18+ const locationString = location ?. city ?
19+ `${ location . city } ${ location . state ? `, ${ location . state } ` : '' } ` :
2020 'Location not specified'
21-
21+
2222 // Status badge styling
2323 const getStatusBadge = ( ) => {
24- switch ( status ) {
24+ switch ( status ) {
2525 case 'sold' :
2626 return (
2727 < div className = "absolute top-0 left-0 bg-red-600 text-white px-4 py-2 rounded-br-lg font-semibold" >
@@ -44,23 +44,23 @@ const PropertyCard = ({ property }) => {
4444 return null ;
4545 }
4646 } ;
47-
47+
4848 // Check if property is sold or rented
4949 const isUnavailable = status === 'sold' || status === 'rented' ;
50-
50+
5151 return (
52- < motion . div
52+ < motion . div
5353 className = "bg-white rounded-lg shadow-lg overflow-hidden h-full flex flex-col"
5454 whileHover = { { y : - 5 } }
5555 transition = { { duration : 0.3 } }
5656 >
5757 < div className = "relative h-52 bg-neutral-200" >
5858 { /* Image with overlay link to full details */ }
59- < Link to = { `/property /${ slug ?. current || property . _id } ` } className = "block h-full" >
59+ < Link to = { `/properties /${ slug ?. current || property . _id } ` } className = "block h-full" >
6060 { imageData ? (
6161 < >
62- < GatsbyImage
63- image = { imageData }
62+ < GatsbyImage
63+ image = { imageData }
6464 alt = { title }
6565 className = "h-full w-full object-cover"
6666 />
@@ -84,16 +84,16 @@ const PropertyCard = ({ property }) => {
8484 </div> */ }
8585 { getStatusBadge ( ) }
8686 </ div >
87-
87+
8888 < div className = "p-6 flex-grow" >
89- < Link to = { `/property /${ slug ?. current || property . _id } ` } className = "block hover:text-primary-600 transition-colors" >
89+ < Link to = { `/properties /${ slug ?. current || property . _id } ` } className = "block hover:text-primary-600 transition-colors" >
9090 < h3 className = "text-xl font-semibold mb-2" > { title } </ h3 >
9191 </ Link >
9292 < div className = "flex items-center text-neutral-600 mb-4" >
9393 < FaMapMarkerAlt className = "mr-2 text-primary-600" />
9494 < span > { locationString } </ span >
9595 </ div >
96-
96+
9797 < div className = "grid grid-cols-3 gap-4 mb-4" >
9898 < div className = "flex items-center" >
9999 < FaBed className = "mr-2 text-primary-600" />
@@ -108,24 +108,24 @@ const PropertyCard = ({ property }) => {
108108 < span > { area ? `${ area } ${ property . areaUnit || 'sqft' } ` : 'N/A' } </ span >
109109 </ div >
110110 </ div >
111-
111+
112112 { description && (
113113 < div className = "text-neutral-600 mb-4 line-clamp-3" >
114114 { description [ 0 ] ?. children ?. map ( child => child . text ) . join ( ' ' ) || 'No description available' }
115115 </ div >
116116 ) }
117-
117+
118118 { amenities && amenities . length > 0 && (
119- < div className = "flex flex-wrap gap-2 mb-4" >
119+ < div className = "flex flex-wrap gap-2 mb-4" >
120120 { amenities . slice ( 0 , 3 ) . map ( ( amenity , index ) => (
121- < span key = { index } className = "bg-neutral-100 text-neutral-700 px-2 py-1 rounded-full text-xs" >
121+ < span key = { index } className = "bg-neutral-100 text-neutral-700 px-2 py-1 rounded-full text-xs" >
122122 { amenity }
123- </ span >
124- ) ) }
125- </ div >
123+ </ span >
124+ ) ) }
125+ </ div >
126126 ) }
127127 </ div >
128-
128+
129129 < div className = "p-6 pt-0" >
130130 { isUnavailable ? (
131131 < motion . button
@@ -148,7 +148,7 @@ const PropertyCard = ({ property }) => {
148148 < FaEye className = "mr-2" />
149149 Quick View
150150 </ motion . button >
151-
151+
152152 < motion . div
153153 className = "flex-1 text-center rounded-md"
154154 whileHover = { { scale : 1.02 } }
@@ -158,7 +158,7 @@ const PropertyCard = ({ property }) => {
158158 formType = { FORM_TYPES . PROPERTY_ENQUIRY }
159159 buttonText = "Enquire"
160160 buttonClass = "bg-primary-600 w-full hover:bg-primary-700 text-white font-semibold py-3 px-4 rounded-md transition-colors"
161- data = { {
161+ data = { {
162162 property : `${ title } (${ slug ?. current || property . _id } )`
163163 } }
164164 />
0 commit comments