Skip to content

Commit

Permalink
idk, something changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sped32DJ committed Jan 21, 2024
1 parent e2f94d1 commit bfff1f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WeatherCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const WeatherCard = ({ weatherData }) => {
if (!weatherData || !weatherData.current_condition || weatherData.current_condition.length === 0) {
return null; // Return null or some loading indicator if weatherData is not available yet
}
const nearestArea = weatherData.nearest_area[0];
const cityName = nearestArea.areaName[0].value;

const currentCondition = weatherData.current_condition[0];
// const getCity = nearestArea.areaName[0].value;
Expand Down Expand Up @@ -45,7 +47,7 @@ const WeatherCard = ({ weatherData }) => {

return (
<div style={cardStyle}>
<h3>Weather Information</h3>
<h3>Weather Information for {cityName}</h3>
<p>Temperature: {temperature}°F</p>
<p>Wind Speed: {windSpeed} mph</p>
<p>Precipitation: {precipitation} MM</p>
Expand Down

0 comments on commit bfff1f1

Please sign in to comment.