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

@@ -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);