local-weather/components/Temperature.tsx
2024-05-10 12:34:38 +02:00

12 lines
275 B
TypeScript

import { useContext } from "react";
import { WeatherContext } from "./WeatherNow";
export default function Temperature() {
const { weather } = useContext(WeatherContext)
const feels = weather.current.apparent_temperature;
return (
<p>{feels}°C</p>
)
}