Skip to content

Commit b2c7738

Browse files
feat(substations): add as 9th entry point (homepage + footer + counts) (#223)
Substations data, API, tile layer, and detail pages shipped across PRs #185-#201 but the homepage/footer entry points were never added (PR #202 was closed without replacement). From the user perspective, substations simply weren't discoverable — no card on the landing page, no footer link, no count in the stats rail. This adds the missing surface-level entry points: - New 9th entity card (Infrastructure · OSM · ≥69 kV · ~60k rows) - Footer link in 'The data' column - API endpoint listed in 'For developers' - Live count wiring via useEntityCounts - Section heading: 'Eight entry points' → 'Nine entry points' Unblocks Victor's DM about 'not seeing Substations anywhere'. Co-authored-by: texture-coding-agent <coding-agent@texturehq.com>
1 parent c5e32e3 commit b2c7738

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

app/(shell)/page.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@ const ENTITY_CARDS = [
7979
countKey: "pricingNodes" as const,
8080
tags: ["LMP", "DA / RT"],
8181
},
82+
{
83+
num: "09",
84+
cat: "Infrastructure",
85+
href: "/substations",
86+
name: "Substations",
87+
desc: "Step-up, step-down, and switching substations \u2014 voltage class, owner, and interconnected assets normalized from OpenStreetMap.",
88+
countKey: "substations" as const,
89+
tags: ["OSM", "\u226569 kV"],
90+
},
8291
];
8392

8493
const LEDGER_ROWS = [
@@ -164,6 +173,7 @@ const ENDPOINT_DEFS = [
164173
{ path: "/transmission-lines", countKey: "transmissionLines" as const, suffix: "lines" },
165174
{ path: "/ev-stations", countKey: "evStations" as const, suffix: "stations" },
166175
{ path: "/pricing-nodes", countKey: "pricingNodes" as const, suffix: "nodes" },
176+
{ path: "/substations", countKey: "substations" as const, suffix: "substations" },
167177
{ path: "/programs", countKey: "programs" as const, suffix: "programs" },
168178
{ path: "/search", desc: "full-text" },
169179
{ path: "/changelog", desc: "every edit, attributed" },
@@ -200,6 +210,7 @@ export default function LandingPage() {
200210
transmissionLines: formatCount(counts.transmissionLines),
201211
evStations: formatCount(counts.evStations),
202212
pricingNodes: formatCount(counts.pricingNodes),
213+
substations: formatCount(counts.substations),
203214
};
204215

205216
return (
@@ -928,7 +939,7 @@ export default function LandingPage() {
928939
<div className="section-head">
929940
<div>
930941
<div className="kicker">01 &middot; Browse</div>
931-
<h2 className="section-title">Eight entry points, one connected graph.</h2>
942+
<h2 className="section-title">Nine entry points, one connected graph.</h2>
932943
</div>
933944
<p className="section-desc">
934945
Every utility links to its territory, every territory to its operator, every plant to its interconnection.
@@ -1331,6 +1342,7 @@ export default function LandingPage() {
13311342
<Link href="/explore">Territories</Link>
13321343
<Link href="/grid-operators">Operators</Link>
13331344
<Link href="/power-plants">Power plants</Link>
1345+
<Link href="/substations">Substations</Link>
13341346
<Link href="/ev-charging">EV charging</Link>
13351347
<Link href="/changelog">Full changelog</Link>
13361348
</div>

hooks/useEntityCounts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface EntityCounts {
1313
pricingNodes: number | null;
1414
programs: number | null;
1515
territories: number | null;
16+
substations: number | null;
1617
}
1718

1819
export const COUNT_ENDPOINTS: { key: keyof EntityCounts; path: string }[] = [
@@ -26,6 +27,7 @@ export const COUNT_ENDPOINTS: { key: keyof EntityCounts; path: string }[] = [
2627
{ key: "pricingNodes", path: "/api/v1/pricing-nodes?limit=1" },
2728
{ key: "programs", path: "/api/v1/programs?limit=1" },
2829
{ key: "territories", path: "/api/v1/territories?limit=1" },
30+
{ key: "substations", path: "/api/v1/substations?limit=1" },
2931
];
3032

3133
export function useEntityCounts(): EntityCounts {
@@ -40,6 +42,7 @@ export function useEntityCounts(): EntityCounts {
4042
pricingNodes: null,
4143
programs: null,
4244
territories: null,
45+
substations: null,
4346
});
4447

4548
useEffect(() => {

0 commit comments

Comments
 (0)