local-weather/components/Temperature.tsx
2024-05-10 10:07:18 +02:00

14 lines
277 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>
)
}