Skip to content

Commit

Permalink
Update CarList.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Aug 26, 2024
1 parent 622446e commit 17a901b
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions frontend/src/components/CarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,22 +306,24 @@ const CarList = ({

{rows.map((car) => (
<div key={car._id} className="car-list-container">
<div className="car-header">
{pickupLocationName && (
<>
<div className="location">
<LocationIcon />
<span className="location-name">{pickupLocationName}</span>
</div>
{distance && (
<div className="distance">
<img alt="Distance" src={DistanceIcon} />
<Badge backgroundColor="#D8EDF9" color="#000" text={`${distance} ${strings.FROM_YOU}`} />
{(pickupLocationName || distance) && (
<div className="car-header">
{pickupLocationName && (
<>
<div className="location">
<LocationIcon />
<span className="location-name">{pickupLocationName}</span>
</div>
)}
</>
)}
</div>
{distance && (
<div className="distance">
<img alt="Distance" src={DistanceIcon} />
<Badge backgroundColor="#D8EDF9" color="#000" text={`${distance} ${strings.FROM_YOU}`} />
</div>
)}
</>
)}
</div>
)}
<article>
<div className="name">
<h2>{car.name}</h2>
Expand Down

0 comments on commit 17a901b

Please sign in to comment.