forked from OurHike/OurHike
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlegendLabels.ts
More file actions
27 lines (25 loc) · 964 Bytes
/
Copy pathlegendLabels.ts
File metadata and controls
27 lines (25 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Display names for legend rows, kept out of Legend.tsx so that file exports
// only a component (React Fast Refresh breaks on modules that mix the two).
//
// This is NOT the full category list - WIREFRAMES.md puts that in Settings.
// The legend only ever names what is actually on screen, so an entry here is a
// label for a type the map can render, not a declaration that it exists.
export const TYPE_LABELS: Record<string, string> = {
water: 'Water',
shelter: 'Shelter',
campsite: 'Campsite',
resupply: 'Resupply',
town: 'Town',
parking: 'Parking',
crossing: 'Crossing',
viewpoint: 'Viewpoint',
// "Privy" rather than "Toilet" or "Restroom": it is what the sign on the
// trail says, what ATC calls the layer, and what a hiker asking for one
// will say out loud.
privy: 'Privy',
closure: 'Closure',
'serious-warning': 'Serious warning',
}
export function typeLabel(type: string): string {
return TYPE_LABELS[type] ?? type
}