diff --git a/web/src/components/card/SearchThumbnail.tsx b/web/src/components/card/SearchThumbnail.tsx index 4f9aed84b..72a560deb 100644 --- a/web/src/components/card/SearchThumbnail.tsx +++ b/web/src/components/card/SearchThumbnail.tsx @@ -91,8 +91,9 @@ export default function SearchThumbnail({ > {getIconForLabel(objectLabel, "size-3 text-white")} {Math.round( - (searchResult.data.score ?? searchResult.data.top_score) * - 100, + (searchResult.data.score ?? + searchResult.data.top_score ?? + searchResult.top_score) * 100, )} % diff --git a/web/src/types/search.ts b/web/src/types/search.ts index 7dee1bbc4..d7f3fb97d 100644 --- a/web/src/types/search.ts +++ b/web/src/types/search.ts @@ -35,6 +35,7 @@ export type SearchResult = { zones: string[]; search_source: SearchSource; search_distance: number; + top_score: number; // for old events data: { top_score: number; score: number;