added a swicher on the properties
All checks were successful
Build frontend / build (push) Successful in 46s

This commit is contained in:
mouazkh
2026-05-26 20:24:37 +03:00
parent a3657e5c2f
commit caddf55811
2 changed files with 21 additions and 11 deletions

View File

@ -80,7 +80,7 @@ function mapApiProperty(item, index) {
features,
images,
status,
rating: item.rating || 4.5,
rating: item.rating || 0,
isNew: false,
_raw: item,
};
@ -299,10 +299,12 @@ const PropertyCard = ({ property, viewMode = 'grid', onLoginRequired }) => {
<span>{property.area}م²</span>
</div>
</div>
{property.rating > 0 && (
<div className="flex items-center gap-1">
<Star className="w-4 h-4 fill-gray-400 text-gray-400" />
<span className="text-sm font-medium text-gray-700">{property.rating || 4.5}</span>
<Star className="w-4 h-4 fill-amber-500 text-amber-500" />
<span className="text-sm font-medium text-gray-700">{property.rating.toFixed(1)}</span>
</div>
)}
</div>
<Link