mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-26 19:26:59 -05:00
Fix critical 'any' types in components
This commit is contained in:
@@ -136,7 +136,9 @@ export function AdvancedRideFilters({
|
||||
<Label>Filter Type</Label>
|
||||
<Select
|
||||
value={filter.operator}
|
||||
onValueChange={(value: any) => updateTechnicalSpecFilter(index, { operator: value })}
|
||||
onValueChange={(value: 'equals' | 'contains' | 'range' | 'has_spec') =>
|
||||
updateTechnicalSpecFilter(index, { operator: value })
|
||||
}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
|
||||
@@ -108,7 +108,15 @@ export function AutocompleteSearch({
|
||||
setIsOpen(true);
|
||||
};
|
||||
|
||||
const handleResultClick = (result: SearchResult | { id: string; type: string; title: string; subtitle: string; data: any }) => {
|
||||
type SearchResultOrSuggestion = SearchResult | {
|
||||
id: string;
|
||||
type: 'suggestion';
|
||||
title: string;
|
||||
subtitle: string;
|
||||
data: Record<string, unknown> | null;
|
||||
};
|
||||
|
||||
const handleResultClick = (result: SearchResultOrSuggestion) => {
|
||||
if (result.type === 'suggestion') {
|
||||
setQuery(result.title);
|
||||
setIsOpen(false);
|
||||
|
||||
Reference in New Issue
Block a user