Fixed and changes
This commit is contained in:
@@ -15,7 +15,7 @@ export function WeatherCard() {
|
||||
async function fetchWeather() {
|
||||
try {
|
||||
const res = await fetch(
|
||||
`https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LNG}¤t=temperature_2m,relative_humidity_2m,weather_code&daily=temperature_2m_max,temperature_2m_min&temperature_unit=fahrenheit&timezone=auto`
|
||||
`https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LNG}¤t=temperature_2m,relative_humidity_2m,weather_code&daily=temperature_2m_max,temperature_2m_min&temperature_unit=celsius&timezone=auto`
|
||||
);
|
||||
const data = await res.json();
|
||||
setWeather(data);
|
||||
@@ -62,7 +62,7 @@ export function WeatherCard() {
|
||||
</div>
|
||||
|
||||
<div className="flex items-end gap-4 mt-2">
|
||||
<div className="text-4xl font-bold text-white tracking-tighter">{Math.round(current.temperature_2m)}°F</div>
|
||||
<div className="text-4xl font-bold text-white tracking-tighter">{Math.round(current.temperature_2m)}°C</div>
|
||||
<div className="pb-1 text-sm text-neutral-400 font-medium">{getWeatherDescription(current.weather_code)}</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user