import { WiDaySunny, WiNightClear, WiDayCloudy, WiNightCloudy, WiCloud, WiCloudy, WiDayShowers, WiNightShowers, WiRain, WiThunderstorm, WiSnow, WiFog, } from 'react-icons/wi'; export default function WeatherIcon({ name }) { let icon; // name is the openweathermap icon name, see https://openweathermap.org/weather-conditions switch (name) { case '01d': icon = ; break; case '01n': icon = ; break; case '02d': icon = ; break; case '02n': icon = ; break; case '03d': case '03n': icon = ; break; case '04d': case '04n': icon = ; break; case '09d': icon = ; break; case '09n': icon = ; break; case '10d': case '10n': icon = ; break; case '11d': case '11n': icon = ; break; case '13d': case '13n': icon = ; break; case '50d': case '50n': icon = ; break; default: icon = null; break; } return icon; }