Advertisement
Guest User

Untitled

a guest
May 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. const AppQuestionIdentify = props =>
  2. <div>
  3. {
  4. props.question.options.map((question,index) =>
  5. [<button
  6. key={3*index}
  7. onClick={() => props.store.dispatch({type: SELECT_IDENTIFY_BUTTON, option: question})}
  8. dangerouslySetInnerHTML={{__html: question}}>
  9. </button>,
  10. {props.response.selected.indexOf(question) != -1 &&
  11. <span key={3*index+1}>
  12. ": " + props.response.selected[props.response.selected.indexOf(question)].count
  13. </span>
  14. },
  15. <br key={3*index+2} />]
  16. ).reduce((xs, ys) => xs.concat(ys))
  17. }
  18. </div>
  19.  
  20. /*
  21. SyntaxError: src/app.js: Unexpected token, expected , (79:9)
  22. 77 | dangerouslySetInnerHTML={{__html: question}}>
  23. 78 | </button>,
  24. > 79 | {props.response.selected.indexOf(question) != -1 &&
  25. | ^
  26. 80 | <span key={3*index+1}>
  27. 81 | ": " + props.response.selected[props.response.selected.indexOf(question)].count
  28. 82 | </span>
  29. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement