mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 09:11:12 -05:00
Fix: Correctly filter zero values in RideCard
This commit is contained in:
@@ -111,7 +111,7 @@ export function RideCard({ ride, showParkName = true, className }: RideCardProps
|
|||||||
{/* Stats */}
|
{/* Stats */}
|
||||||
<div className="flex items-center justify-between text-sm">
|
<div className="flex items-center justify-between text-sm">
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
{ride.max_speed_kmh && ride.max_speed_kmh > 0 && (
|
{Number(ride.max_speed_kmh) > 0 && (
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<Zap className="w-3 h-3 text-primary" />
|
<Zap className="w-3 h-3 text-primary" />
|
||||||
<span className="text-primary font-medium">
|
<span className="text-primary font-medium">
|
||||||
@@ -119,14 +119,14 @@ export function RideCard({ ride, showParkName = true, className }: RideCardProps
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{ride.max_height_meters && ride.max_height_meters > 0 && (
|
{Number(ride.max_height_meters) > 0 && (
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<span className="text-accent font-medium">
|
<span className="text-accent font-medium">
|
||||||
<MeasurementDisplay value={ride.max_height_meters} type="distance" />
|
<MeasurementDisplay value={ride.max_height_meters} type="distance" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{ride.duration_seconds && ride.duration_seconds > 0 && (
|
{Number(ride.duration_seconds) > 0 && (
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<Clock className="w-3 h-3 text-secondary" />
|
<Clock className="w-3 h-3 text-secondary" />
|
||||||
<span className="text-secondary font-medium">{Math.floor(ride.duration_seconds / 60)}</span>
|
<span className="text-secondary font-medium">{Math.floor(ride.duration_seconds / 60)}</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user