Skip to content

Commit

Permalink
added key to items in map
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Medesan committed Dec 3, 2020
1 parent f16991e commit bad1456
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ProgressWorkflow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const ProgressWorkflow = (props) => {

const itemTracker = (tracker) => (
<li
key={`progress__item ${tracker[0]}`}
className={`progress__item ${
tracker[0].indexOf(currentStateKey) > -1
? 'progress__item--active'
Expand All @@ -75,8 +76,9 @@ const ProgressWorkflow = (props) => {
: 'progress__item--next'
}`}
>
{tracker[2].map((title) => (
{tracker[2].map((title, index) => (
<p
key={`progress__title ${tracker[0]}${index}`}
className={`progress__title ${
currentState.title !== title ? 'title-incomplete' : ''
}`}
Expand Down

0 comments on commit bad1456

Please sign in to comment.