Skip to content
This repository was archived by the owner on Feb 18, 2022. It is now read-only.

Commit b568055

Browse files
committed
Fix React warning about key and GitHub red code.
1 parent 468870e commit b568055

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/pages/Picture.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Picture extends Component {
1010
<article>
1111
<h2>Picture details</h2>
1212
<h3>{pictures[pictureIndex].name}</h3>
13-
<p>It's only about a single picture.</p>
13+
<p>It is only about a single picture.</p>
1414
<div>
1515
<img src={pictures[pictureIndex].url} alt="Nice one"/>
1616
</div>

src/pages/Pictures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import './Pictures.css'
66
const RenderPictures = (picturesList) => {
77
return picturesList.map((picture, index) => {
88
return (
9-
<div className="Picture">
9+
<div className="Picture" key={`MyPicture_${index}`}>
1010
<img src={picture.url} alt={picture.name}/>
1111
<div className="Picture-name">{picture.name}</div>
1212
<div className="Picture-details-link">

0 commit comments

Comments
 (0)