Skip to content

Commit

Permalink
fix: unique key
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosantangelo committed Apr 30, 2018
1 parent 8763b29 commit bad8b4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/src/components/ParcelTags/ParcelTags.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class ParcelTags extends React.PureComponent {
return district ? district.name : null
}

renderProximityTag = (tag, index) => {
renderProximityTag = (tag, key) => {
const { size, showDetails } = this.props
let name = null
let districtName = null
Expand All @@ -41,7 +41,7 @@ export default class ParcelTags extends React.PureComponent {
}

return (
<div className={`tag ${size}`} key={index}>
<div className={`tag ${size}`} key={key}>
<div
className={`tag-icon tag-icon-${name}`}
data-balloon-pos="up"
Expand Down Expand Up @@ -76,7 +76,7 @@ export default class ParcelTags extends React.PureComponent {

return (
<div className="ParcelTags">
{proximityTagKeys.map(key => this.renderProximityTag(proximity[key]))}
{proximityTagKeys.map(key => this.renderProximityTag(proximity[key], key))}
</div>
)
}
Expand Down

0 comments on commit bad8b4c

Please sign in to comment.