ui: put the miner count before the height tile
Some checks failed
deploy / build (push) Waiting to run
deploy / deploy-api (push) Has been cancelled
deploy / deploy-web (push) Has been cancelled

Height is the one tile with no sparkline — it only goes up, and a straight
diagonal reports nothing — so it sat in the middle of the row with an empty
slot under it, splitting the four lines into two and two. Last, it stops
interrupting them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jp6a8EDar9ueEhAxzep4V5
This commit is contained in:
2026-09-08 14:59:26 +03:00
parent 7e5c2de936
commit 9cbc2cc274

View File

@@ -8,7 +8,9 @@
*
* Under four of them sits the same value's recent history, because a number on
* its own cannot say whether it is high. Height gets none: it only ever goes
* up, and a straight diagonal is a line with nothing to report.
* up, and a straight diagonal is a line with nothing to report — which is why
* it sits last, so the four sparklines run uninterrupted rather than being
* split by a tile with an empty slot.
*
* The series is fetched rather than pushed, and refetched only when the chain
* crosses a bucket boundary — the one moment a point can change. Everything
@@ -198,7 +200,7 @@ export function StatBar({
if (!summary) {
return (
<div className="stats">
{['Network hashrate', 'Difficulty', 'Block time', 'Height', 'Miners'].map((label) => (
{['Network hashrate', 'Difficulty', 'Block time', 'Miners', 'Height'].map((label) => (
<Stat key={label} label={label} value="—" />
))}
</div>
@@ -230,7 +232,6 @@ export function StatBar({
note={`target ${seconds(summary.target_block_time_seconds)}`}
points={trends?.interval ?? null}
/>
<Stat label="Height" value={height(summary.height)} note="best block seen" />
<TrendStat
label="Miners"
value={String(summary.distinct_miners)}
@@ -241,6 +242,7 @@ export function StatBar({
}
points={trends?.miners ?? null}
/>
<Stat label="Height" value={height(summary.height)} note="best block seen" />
</div>
)
}