Skip to content

Commit

Permalink
[#46] fix: add unique key prop
Browse files Browse the repository at this point in the history
  • Loading branch information
suzinxix committed Feb 24, 2023
1 parent 5120816 commit f79586b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bowwowcare/src/views/HomePage/PetList/PetList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ function PetList(props) {
<div className="flex overflow-x-scroll">
{props.pets.map((pet, i) => {
return (
<Link to={`/petinfo/${pet.petId}`} state={{ pet: pet }}>
<PetInfo pet={pet} />
</Link>
<div key={i}>
<Link to={`/petinfo/${pet.petId}`} state={{ pet: pet }}>
<PetInfo pet={pet} />
</Link>
</div>
);
})}
<div>
Expand Down

0 comments on commit f79586b

Please sign in to comment.