diff --git a/components/WeatherIcon.tsx b/components/WeatherIcon.tsx
index ae32b51..410f5c8 100644
--- a/components/WeatherIcon.tsx
+++ b/components/WeatherIcon.tsx
@@ -17,8 +17,7 @@ import { HourlyForecast } from "@/types/types";
-function getCurrentWeatherIcon(weather: HourlyForecast) {
- const weatherCode = weather.current.weather_code;
+function getCurrentWeatherIcon(weatherCode: number) {
switch (weatherCode) {
default:
return sun;
@@ -84,10 +83,11 @@ function getCurrentWeatherIcon(weather: HourlyForecast) {
export default function WeatherIcon() {
const { weather } = useContext(WeatherContext)
+ const weatherCode = weather.current.weather_code
return(
<>
-
{weather.current.weather_code}
+