MatchList.js 866 B

12345678910111213141516171819202122232425262728293031323334
  1. import React from 'react'
  2. import MatchDisp from './MatchDisp'
  3. class MatchList extends React.Component {
  4. render () {
  5. const matches = this.props.match.matches
  6. const filtered = this.props.match.filtered
  7. return (
  8. <div>
  9. <h2>Matches ({filtered.length}/{matches.length})</h2>
  10. <table className='table table-bordered table-striped'>
  11. <thead>
  12. <tr>
  13. <th>Ort</th>
  14. <th>Datum</th>
  15. <th>Zeit</th>
  16. <th>Konkurrenz</th>
  17. <th>Spieler 1</th>
  18. <th>Spieler 2</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. {filtered.map((match, key) =>
  23. <MatchDisp key={key} match={match} />
  24. )}
  25. </tbody>
  26. </table>
  27. </div>
  28. )
  29. }
  30. }
  31. export default MatchList