fix(ui): "1.5kkm" — the opening badge showed a doubled unit

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.
This commit is contained in:
2026-08-11 18:04:04 +02:00
parent 78e99afc63
commit 298c2fde44
+5 -2
View File
@@ -6982,8 +6982,11 @@ export default function App() {
it said something was happening and refused to say what. */} it said something was happening and refused to say what. */}
<span>{String(o.band).toUpperCase()}</span> <span>{String(o.band).toUpperCase()}</span>
<span className="font-mono">{o.compass}</span> <span className="font-mono">{o.compass}</span>
<span className="font-mono opacity-80">{o.median_km >= 1000 {/* Plain kilometres. An earlier attempt abbreviated 1500 to
? `${(o.median_km / 1000).toFixed(1)}k` : o.median_km}km</span> "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. */}
<span className="font-mono opacity-80">{o.median_km} km</span>
{/* Out of season is the one an operator must not learn last, so it {/* 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. */} earns a mark on the badge rather than a line in the tooltip. */}
{!o.in_season && <span className="opacity-90">!</span>} {!o.in_season && <span className="opacity-90">!</span>}