From ae679ac15cf7ef70b542427b0b0352e6f035b1af Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Tue, 15 Oct 2024 07:49:48 -0500 Subject: [PATCH] fix score --- web/src/components/card/SearchThumbnail.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/components/card/SearchThumbnail.tsx b/web/src/components/card/SearchThumbnail.tsx index 3217917c1..4ad7d7c5c 100644 --- a/web/src/components/card/SearchThumbnail.tsx +++ b/web/src/components/card/SearchThumbnail.tsx @@ -90,7 +90,10 @@ export default function SearchThumbnail({ onClick={() => onClick(searchResult)} > {getIconForLabel(objectLabel, "size-3 text-white")} - {Math.round(searchResult.data.score * 100)}% + {Math.floor( + searchResult.score ?? searchResult.data.top_score * 100, + )} + %