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")} {getIconForLabel(objectLabel, "size-3 text-white")}
{Math.round( {Math.round(
(searchResult.data.score ?? searchResult.data.top_score) * (searchResult.data.score ??
100, searchResult.data.top_score ??
searchResult.top_score) * 100,
)} )}
% %
</Chip> </Chip>

View File

@ -35,6 +35,7 @@ export type SearchResult = {
zones: string[]; zones: string[];
search_source: SearchSource; search_source: SearchSource;
search_distance: number; search_distance: number;
top_score: number; // for old events
data: { data: {
top_score: number; top_score: number;
score: number; score: number;