local-weather/components/Temperature.tsx

12 lines
301 B
TypeScript
Raw Normal View History

import { useContext } from "react";
import { WeatherContext } from "./WeatherNow";
export default function Temperature() {
const { weather } = useContext(WeatherContext)
const feels = weather.current.apparent_temperature;
return (
2024-05-12 19:14:36 +00:00
<p className="text-2xl mt-2">{feels}°C</p>
)
2024-05-10 10:34:38 +00:00
}