weather icons
This commit is contained in:
@@ -72,7 +72,12 @@ const Weather = () => {
|
||||
<div className="text-sm text-gray-600">No coordinates set</div>
|
||||
) : weatherMap[p.id]?.weather ? (
|
||||
<div className="flex items-center">
|
||||
<img alt="" width="50" height="50" src={`https://openweathermap.org/img/wn/${weatherMap[p.id].weather.current.icon}@2x.png`} />
|
||||
<img
|
||||
alt=""
|
||||
width="50"
|
||||
height="50"
|
||||
src={`${(process.env.REACT_APP_API_URL || '')}/weather/icon/${weatherMap[p.id].weather.current.icon}?size=2x`}
|
||||
/>
|
||||
<div className="ml-3">
|
||||
<div className="text-xl font-bold">{weatherMap[p.id].weather.current.temperature}°F</div>
|
||||
<div className="text-sm text-gray-700">{weatherMap[p.id].weather.current.conditions}</div>
|
||||
@@ -93,7 +98,13 @@ const Weather = () => {
|
||||
<div className="font-medium">
|
||||
{new Date(d.date).toLocaleDateString(undefined, { weekday: 'short' })}
|
||||
</div>
|
||||
<img alt="" className="mx-auto" width="40" height="40" src={`https://openweathermap.org/img/wn/${d.icon}@2x.png`} />
|
||||
<img
|
||||
alt=""
|
||||
className="mx-auto"
|
||||
width="40"
|
||||
height="40"
|
||||
src={`${(process.env.REACT_APP_API_URL || '')}/weather/icon/${d.icon}?size=2x`}
|
||||
/>
|
||||
<div>{d.temperatureHigh}° / {d.temperatureLow}°</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user