From b7d77212b6866e1471077a447cc76a22245e5ef3 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:06:06 -0600 Subject: [PATCH] frontend --- .../overlay/detail/SearchDetailDialog.tsx | 21 +++++++++++++++++++ web/src/types/search.ts | 1 + 2 files changed, 22 insertions(+) diff --git a/web/src/components/overlay/detail/SearchDetailDialog.tsx b/web/src/components/overlay/detail/SearchDetailDialog.tsx index b0eeac98d..dc03eef5a 100644 --- a/web/src/components/overlay/detail/SearchDetailDialog.tsx +++ b/web/src/components/overlay/detail/SearchDetailDialog.tsx @@ -316,6 +316,18 @@ function ObjectDetailsTab({ } }, [search]); + const maxEstimatedSpeed = useMemo(() => { + if (!search || !search.data?.max_estimated_speed) { + return undefined; + } + + if (search.data?.max_estimated_speed != 0) { + return search.data?.max_estimated_speed.toFixed(1); + } else { + return undefined; + } + }, [search]); + const updateDescription = useCallback(() => { if (!search) { return; @@ -427,6 +439,15 @@ function ObjectDetailsTab({ {score}%{subLabelScore && ` (${subLabelScore}%)`} + {maxEstimatedSpeed && ( +