local-weather/components/HourlyCard/HourlyCard.tsx

14 lines
488 B
TypeScript

import { HourlyCardPropType } from "@/types/types"
import WeatherIcon from "./WeatherIcon"
import HourlyTemp from "./HourlyTemp"
export default function HourlyCard(props: HourlyCardPropType) {
const weatherCode = props.weather.weather_code[props.timeIndex]
const temperature = props.weather.apparent_temperature[props.timeIndex]
return (
<>
<WeatherIcon weatherCode={weatherCode}/>
<HourlyTemp temperature={temperature} />
</>
)
};