Fix: Resolve TypeScript errors

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 02:28:57 +00:00
parent f6c409fac4
commit 9e8e8719b4
14 changed files with 48 additions and 30 deletions

View File

@@ -99,8 +99,8 @@ export function useSearch(options: UseSearchOptions = {}) {
type: 'park',
title: park.name,
subtitle: [park.location?.city, park.location?.state_province, park.location?.country].filter(Boolean).join(', '),
image: park.banner_image_url || park.card_image_url,
rating: park.average_rating,
image: park.banner_image_url || park.card_image_url || undefined,
rating: park.average_rating ?? undefined,
slug: park.slug,
data: park
});
@@ -125,8 +125,8 @@ export function useSearch(options: UseSearchOptions = {}) {
type: 'ride',
title: ride.name,
subtitle: `at ${ride.park?.name || 'Unknown Park'}`,
image: ride.image_url,
rating: ride.average_rating,
image: ride.image_url || undefined,
rating: ride.average_rating ?? undefined,
slug: ride.slug,
data: ride
});
@@ -147,7 +147,7 @@ export function useSearch(options: UseSearchOptions = {}) {
type: 'company',
title: company.name,
subtitle: company.company_type?.replace('_', ' ').replace(/\b\w/g, l => l.toUpperCase()) || 'Company',
image: company.logo_url,
image: company.logo_url || undefined,
slug: company.slug,
data: company
});