mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 14:31:12 -05:00
Refactor: Conditionally display park stats
This commit is contained in:
@@ -89,14 +89,18 @@ export function ParkCard({ park }: ParkCardProps) {
|
||||
{/* Stats */}
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex items-center gap-1">
|
||||
<span className="text-primary font-medium">{park.ride_count}</span>
|
||||
<span className="text-muted-foreground">rides</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<span className="text-accent font-medium">{park.coaster_count}</span>
|
||||
<FerrisWheel className="w-3 h-3 text-muted-foreground" />
|
||||
</div>
|
||||
{park.ride_count > 0 && (
|
||||
<div className="flex items-center gap-1">
|
||||
<span className="text-primary font-medium">{park.ride_count}</span>
|
||||
<span className="text-muted-foreground">rides</span>
|
||||
</div>
|
||||
)}
|
||||
{park.coaster_count > 0 && (
|
||||
<div className="flex items-center gap-1">
|
||||
<span className="text-accent font-medium">{park.coaster_count}</span>
|
||||
<FerrisWheel className="w-3 h-3 text-muted-foreground" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{park.average_rating > 0 && <div className="flex items-center gap-1">
|
||||
|
||||
Reference in New Issue
Block a user