Fix critical 'any' types in components

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 20:30:01 +00:00
parent 2cd6b2c6c3
commit 3d07198454
10 changed files with 403 additions and 28 deletions

View File

@@ -9,8 +9,17 @@ interface RideHighlight {
value: React.ReactNode;
}
interface RideWithStats {
id: string;
name: string;
max_speed_kmh?: number;
max_height_meters?: number;
inversions?: number;
average_rating?: number;
}
interface RideHighlightsProps {
ride: any;
ride: RideWithStats;
}
export function RideHighlights({ ride }: RideHighlightsProps) {
@@ -44,7 +53,7 @@ export function RideHighlights({ ride }: RideHighlightsProps) {
}
// Add rating highlight if high
if (ride.average_rating >= 4.0) {
if (ride.average_rating && ride.average_rating >= 4.0) {
highlights.push({
icon: <Award className="w-5 h-5 text-yellow-500" />,
label: 'Highly Rated',