Fix: Hide stats with no value

This commit is contained in:
gpt-engineer-app[bot]
2025-09-29 13:15:52 +00:00
parent 53331a4b03
commit aad67f5347

View File

@@ -446,12 +446,12 @@ export default function ParkDetail() {
{/* Stats */} {/* Stats */}
<div className="flex items-center gap-2 flex-wrap"> <div className="flex items-center gap-2 flex-wrap">
{ride.max_speed_kmh && ( {ride.max_speed_kmh && ride.max_speed_kmh > 0 && (
<span className="bg-primary/10 text-primary px-2 py-1 rounded-md text-xs font-medium"> <span className="bg-primary/10 text-primary px-2 py-1 rounded-md text-xs font-medium">
<MeasurementDisplay value={ride.max_speed_kmh} type="speed" /> <MeasurementDisplay value={ride.max_speed_kmh} type="speed" />
</span> </span>
)} )}
{ride.max_height_meters && ( {ride.max_height_meters && ride.max_height_meters > 0 && (
<span className="bg-accent/10 text-accent px-2 py-1 rounded-md text-xs font-medium"> <span className="bg-accent/10 text-accent px-2 py-1 rounded-md text-xs font-medium">
<MeasurementDisplay value={ride.max_height_meters} type="distance" /> <MeasurementDisplay value={ride.max_height_meters} type="distance" />
</span> </span>