From 298c2fde44727a775da299ac777adf9b78400305 Mon Sep 17 00:00:00 2001 From: Gregory Salaun Date: Tue, 11 Aug 2026 18:04:04 +0200 Subject: [PATCH] =?UTF-8?q?fix(ui):=20"1.5kkm"=20=E2=80=94=20the=20opening?= =?UTF-8?q?=20badge=20showed=20a=20doubled=20unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Abbreviating 1500 to "1.5k" and then appending "km" produced "1.5kkm", which means nothing. Plain kilometres now. Written correctly it would still have been wrong: "1.5k km" asks the reader to do arithmetic to recover a number that was four characters long to begin with. There was nothing to save. --- frontend/src/App.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index eb21213..954904e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6982,8 +6982,11 @@ export default function App() { it said something was happening and refused to say what. */} {String(o.band).toUpperCase()} {o.compass} - {o.median_km >= 1000 - ? `${(o.median_km / 1000).toFixed(1)}k` : o.median_km}km + {/* Plain kilometres. An earlier attempt abbreviated 1500 to + "1.5k" and then appended the unit, giving "1.5kkm" — and even + written correctly, "1.5k km" makes a reader do arithmetic to + recover a number that was four characters long to begin with. */} + {o.median_km} km {/* Out of season is the one an operator must not learn last, so it earns a mark on the badge rather than a line in the tooltip. */} {!o.in_season && !}