SkateSpots/src/lib/skateabilityLevels.ts
SkateSpots 54882285b6 feat(weather): 6-day forecast
FORECAST_DAYS=6 in lib/weather.ts is the single source for the fetch length and the UI labels (spot card + map popup). New count-interpolated labels spotUi.forecastDays / mapUi.forecastDays (en/es; other locales fall back to English). Legend colours moved to lib/skateabilityLevels.ts to keep the react-refresh lint at zero.
2026-10-12 13:51:29 +07:00

15 lines
703 B
TypeScript

/**
* The skateability colour scale, shown in the map's weather legend.
*
* Kept as a plain module (not exported from a component file — that trips the
* `react-refresh` lint rule) and mirrors the colours emitted by
* `calculateSkateability` in `lib/weather.ts`. If a threshold there changes,
* change it here too.
*/
export const SKATEABILITY_LEVELS: { key: string; color: string }[] = [
{ key: 'weatherUi.skateability.perfect', color: '#00e400' },
{ key: 'weatherUi.skateability.good', color: '#92d050' },
{ key: 'weatherUi.skateability.okay', color: '#ffff00' },
{ key: 'weatherUi.skateability.poor', color: '#ff7e00' },
{ key: 'weatherUi.skateability.bad', color: '#ff0000' },
];