fix(storm-intel): show CloudHail icon for ice-pellet/hail forecast codes
Tomorrow.io 7xxx codes are ice pellets, not snow — remapped from Snowflake to CloudHail. Added hailRisk override so any day flagged as hail risk by the API always renders the hail icon regardless of weatherCode. Also added missing 6xxx (freezing rain) codes to the icon table. Mock Sunday entry corrected to weatherCode 8000 (thunderstorm) — 7102 at 76°F made no meteorological sense.
This commit is contained in:
@@ -20,7 +20,7 @@ const MOCK_FORECAST = [
|
||||
{ date: '2026-05-21T06:00:00Z', precipProb: 52, weatherCode: 4001, weatherLabel: 'Rain', hailRisk: false, windGust: 30, windSpeed: 18, tempF: 71, humidity: 68, stormScore: 34 },
|
||||
{ date: '2026-05-22T06:00:00Z', precipProb: 18, weatherCode: 1001, weatherLabel: 'Cloudy', hailRisk: false, windGust: 16, windSpeed: 10, tempF: 76, humidity: 52, stormScore: 9 },
|
||||
{ date: '2026-05-23T06:00:00Z', precipProb: 8, weatherCode: 1000, weatherLabel: 'Clear', hailRisk: false, windGust: 12, windSpeed: 7, tempF: 81, humidity: 38, stormScore: 4 },
|
||||
{ date: '2026-05-24T06:00:00Z', precipProb: 42, weatherCode: 7102, weatherLabel: 'Light Hail', hailRisk: true, windGust: 35, windSpeed: 22, tempF: 76, humidity: 61, stormScore: 71 },
|
||||
{ date: '2026-05-24T06:00:00Z', precipProb: 42, weatherCode: 8000, weatherLabel: 'Thunderstorm', hailRisk: true, windGust: 35, windSpeed: 22, tempF: 76, humidity: 61, stormScore: 71 },
|
||||
];
|
||||
|
||||
export function useStormForecast() {
|
||||
|
||||
Reference in New Issue
Block a user