render()

in source/webapp/src/App.js [123:158]


  render() {
    return (
      <div className="App">
      <h1>Today's Games</h1>
      <Row style={mainRowStyle}>
      {
          this.state.games?.map(game => (
            <Col span={6} key={game.id}>
              <Card hoverable title={game.stage.season.name} extra={<a href={'/games/' + game.id}>More</a>} style={cardStyle}>
                <b style={competitorStyle}>{game.home.name}</b><br></br>vs<br></br><b style={competitorStyle}>{game.away.name}</b>
                <p>Stage: {game.stage.name}</p>
                <p>KickOff: {new Date(game.plannedKickoffTime).toLocaleTimeString()}</p>
                <p style={venueStyle}>Venue: {game.venue.name}, {game.venue.city}</p>
                {game.gameStatus?.status !== 'started' && (
                  <p>{game.gameStatus?.status}</p>
                )}
                {
                  game.events.items[game.events.items.length -1] != null && (
                    <p>{game.events.items[game.events.items.length -1].clock}</p>
                  )
                }
                <p>{game.gameStatus?.homeScore} - {game.gameStatus?.awayScore}</p>
                {
                  game.lastType != null && (
                    <p>Last Event: <b>{game.lastType}</b></p>
                  )
                }
                {
                  game.lastCommentary != null && (
                    <p><i>{game.lastCommentary}</i></p>
                  )
                }
              </Card>
            </Col>      
          ))
        }