Fix: Conditionally display ride stats

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 13:20:23 +00:00
parent 94f4f82dd2
commit cee8efab7c

View File

@@ -178,7 +178,7 @@ export function ContentTabs() {
{/* Stats */}
<div className="flex items-center justify-between text-sm">
<div className="flex items-center gap-4">
{ride.max_speed_kmh && (
{ride.max_speed_kmh && ride.max_speed_kmh > 0 && (
<div className="flex items-center gap-1">
<Zap className="w-3 h-3 text-primary" />
<span className="text-primary font-medium">
@@ -186,14 +186,14 @@ export function ContentTabs() {
</span>
</div>
)}
{ride.max_height_meters && (
{ride.max_height_meters && ride.max_height_meters > 0 && (
<div className="flex items-center gap-1">
<span className="text-accent font-medium">
<MeasurementDisplay value={ride.max_height_meters} type="distance" />
</span>
</div>
)}
{ride.duration_seconds && (
{ride.duration_seconds && ride.duration_seconds > 0 && (
<div className="flex items-center gap-1">
<Clock className="w-3 h-3 text-secondary" />
<span className="text-secondary font-medium">{Math.floor(ride.duration_seconds / 60)}</span>