feat: remove weather from TopBar, clickable forecast days with detail modal (feels like, humidity, wind, precip)
All checks were successful
Deploy / deploy (push) Successful in 3m8s
All checks were successful
Deploy / deploy (push) Successful in 3m8s
This commit is contained in:
@@ -49,7 +49,7 @@ export async function GET(req: Request) {
|
||||
latitude: lat,
|
||||
longitude: lon,
|
||||
current: "temperature_2m,relative_humidity_2m,apparent_temperature,weather_code,wind_speed_10m",
|
||||
daily: "weather_code,temperature_2m_max,temperature_2m_min",
|
||||
daily: "weather_code,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,precipitation_probability_max,wind_speed_10m_max,relative_humidity_2m_max",
|
||||
timezone: "Europe/Moscow",
|
||||
forecast_days: "7",
|
||||
});
|
||||
@@ -73,6 +73,11 @@ export async function GET(req: Request) {
|
||||
minTemp: String(Math.round(daily.temperature_2m_min[i])),
|
||||
desc: wmoToDesc(daily.weather_code[i]),
|
||||
weatherCode: wmoToWttrCode(daily.weather_code[i]),
|
||||
feelsLikeMax: String(Math.round(daily.apparent_temperature_max?.[i] ?? 0)),
|
||||
feelsLikeMin: String(Math.round(daily.apparent_temperature_min?.[i] ?? 0)),
|
||||
precipProb: String(daily.precipitation_probability_max?.[i] ?? 0),
|
||||
windSpeed: String(Math.round((daily.wind_speed_10m_max?.[i] ?? 0) / 3.6)),
|
||||
humidity: String(daily.relative_humidity_2m_max?.[i] ?? 0),
|
||||
}));
|
||||
|
||||
return NextResponse.json({
|
||||
|
||||
Reference in New Issue
Block a user