mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 17:11:13 -05:00
Fix critical 'any' types in components
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user