mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-25 03:11:13 -05:00
Fix critical 'any' types in components
This commit is contained in:
@@ -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