import React from 'react'
import { date2s, time2s } from '../../helpers.js'
class MatchRow extends React.Component {
render () {
const match = this.props.match
return (
{match.Ort || Kein Platz zugeteilt} |
{match.Datum ? date2s(match.Datum) : Kein Datum zugeteilt} |
{match.Datum ? time2s(match.Datum) : Keine Zeit zugeteilt} |
{match.Konkurrenz} |
{match.Spieler1} |
{match.Spieler2} |
)
}
}
class MatchTable extends React.Component {
render () {
console.log(this.props)
const matches = this.props.match.allMatches
const filtered = this.props.match.filteredMatches
return (
Matches ({filtered.length}/{matches.length})
Ort |
Datum |
Zeit |
Konkurrenz |
Spieler 1 |
Spieler 2 |
{filtered.map((match, key) =>
)}
)
}
}
export default MatchTable