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:
@@ -6982,8 +6982,11 @@ export default function App() {
|
||||
it said something was happening and refused to say what. */}
|
||||
<span>{String(o.band).toUpperCase()}</span>
|
||||
<span className="font-mono">{o.compass}</span>
|
||||
<span className="font-mono opacity-80">{o.median_km >= 1000
|
||||
? `${(o.median_km / 1000).toFixed(1)}k` : o.median_km}km</span>
|
||||
{/* 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. */}
|
||||
<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
|
||||
earns a mark on the badge rather than a line in the tooltip. */}
|
||||
{!o.in_season && <span className="opacity-90">!</span>}
|
||||
|
||||
Reference in New Issue
Block a user