Skip to content
Snippets Groups Projects
Commit 5ed4a37c authored by francoisdillinger's avatar francoisdillinger
Browse files

Added key index

parent b0b916e2
No related branches found
No related tags found
No related merge requests found
......@@ -28,8 +28,8 @@ const ForecastCollection = (props) => {
if (forecast && forecast.city) {
return (
<div className="forecast-days">
{forecast.list.map(day => (
<div className="forecasted-day">
{forecast.list.map((day, index) => (
<div key={index} className="forecasted-day">
<p>{new Date(day.dt * 1000).toLocaleDateString('en-US', { weekday: 'long' })}</p>
<img src={`${process.env.PUBLIC_URL}/weatherIconsFill/${day.weather[0].icon}.svg`} alt="weather icon" />
<p>{day.weather[0].main}</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment