use root level top_score for very old events

This commit is contained in:
Josh Hawkins 2024-10-16 22:14:19 -05:00
parent ef187efd58
commit 1d00364a9d
2 changed files with 4 additions and 2 deletions

View File

@ -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,
)}
%
</Chip>

View File

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