diff --git a/src/hooks/useStormForecast.js b/src/hooks/useStormForecast.js index e2069af..1abfc1b 100644 --- a/src/hooks/useStormForecast.js +++ b/src/hooks/useStormForecast.js @@ -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() { diff --git a/src/pages/StormIntelPage.jsx b/src/pages/StormIntelPage.jsx index 83b01f7..323ffb6 100644 --- a/src/pages/StormIntelPage.jsx +++ b/src/pages/StormIntelPage.jsx @@ -63,8 +63,12 @@ const FORECAST_ICONS = { 4000: CloudDrizzle, 4200: CloudDrizzle, 4001: CloudRain, 4201: CloudRain, 8000: CloudLightning, - 7000: Snowflake, 7101: Snowflake, 7102: Snowflake, - 5000: Snowflake, 5100: Snowflake, 5101: Snowflake, + // 5xxx = actual snow + 5000: Snowflake, 5001: Snowflake, 5100: Snowflake, 5101: Snowflake, + // 6xxx = freezing rain + 6000: CloudDrizzle, 6001: CloudRain, 6200: CloudDrizzle, 6201: CloudRain, + // 7xxx = ice pellets / hail — NOT snow + 7000: CloudHail, 7101: CloudHail, 7102: CloudHail, }; function scoreColor(score) { @@ -528,7 +532,7 @@ const ForecastStrip = ({ forecast, loading, alertDay, hasStormAlert }) => {
7-Day {forecast.map((day, i) => { - const FIcon = FORECAST_ICONS[day.weatherCode] ?? Cloud; + const FIcon = day.hailRisk ? CloudHail : (FORECAST_ICONS[day.weatherCode] ?? Cloud); const isAlert = day.stormScore >= 65; const isWarn = day.stormScore >= 40 && !isAlert; const dayLabel = i === 0