mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
fix(shipwrecks): give the era legend its labels and counts
The panel reads legend entries as label and count; the layer sent text, so each entry showed 'undefined'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
112ffd4386
commit
1199fe05c7
1 file changed
+2
-1
@@ -411,7 +411,8 @@ export function createShipwrecksLayer({
|
|||||||
...periodControls(),
|
...periodControls(),
|
||||||
// The colours are a legend: when the ship sank.
|
// The colours are a legend: when the ship sank.
|
||||||
legend: SHIPWRECK_ERAS.map((era) => ({
|
legend: SHIPWRECK_ERAS.map((era) => ({
|
||||||
text: t(ERA_LABELS[era]),
|
label: t(ERA_LABELS[era]),
|
||||||
|
count: countOf(era),
|
||||||
color: ERA_COLORS[era],
|
color: ERA_COLORS[era],
|
||||||
blurb: tn(countOf(era), '{count} wreck', '{count} wrecks', {
|
blurb: tn(countOf(era), '{count} wreck', '{count} wrecks', {
|
||||||
count: formatNumber(countOf(era)),
|
count: formatNumber(countOf(era)),
|
||||||
|
|||||||
Reference in new issue
Block a user