{"size": 1194, "ext": "js", "max_stars_repo_path": "src/components/BoxScore/BoxScore.js", "max_stars_repo_name": "asapzacy/uxscoreboard", "max_stars_repo_stars_event_min_datetime": "2017-09-02T05:37:24.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-29T05:52:31.000Z", "max_issues_repo_path": "src/components/BoxScore/BoxScore.js", "max_issues_repo_name": "zacarellano/uxscoreboard", "max_issues_repo_issues_event_min_datetime": "2020-02-29T23:40:02.000Z", "max_issues_repo_issues_event_max_datetime": "2020-08-30T20:45:44.000Z", "max_forks_repo_path": "src/components/BoxScore/BoxScore.js", "max_forks_repo_name": "zacarellano/uxscoreboard", "max_forks_repo_forks_event_min_datetime": "2019-04-21T14:44:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-10T22:45:51.000Z"}
{"max_stars_count": 27, "max_issues_count": 8, "max_forks_count": 10, "avg_line_length": 19.5737704918, "max_line_length": 62, "alphanum_fraction": 0.5360134003}
import React from 'react'
import {
  formatBoxScoreTableHead,
  formatBoxScoreTableBodyRow
} from 'helpers/boxScoreFns'
import s from './BoxScore.scss'

const BoxScore = ({
  awayTeam,
  homeTeam,
  awayScore,
  homeScore,
  linescore,
  periods,
  totalPeriods,
  league,
  overtimes,
  children
}) => (
  <section className={s.container}>
    <table className={s.table}>
      <thead
        className={s.head}
        dangerouslySetInnerHTML={formatBoxScoreTableHead(
          periods,
          totalPeriods,
          league,
          overtimes
        )}
      />
      <tbody className={s.body}>
        <tr
          dangerouslySetInnerHTML={formatBoxScoreTableBodyRow(
            awayTeam,
            awayScore,
            'away',
            linescore,
            periods,
            totalPeriods,
            league
          )}
        />
        <tr
          dangerouslySetInnerHTML={formatBoxScoreTableBodyRow(
            homeTeam,
            homeScore,
            'home',
            linescore,
            periods,
            totalPeriods,
            league
          )}
        />
      </tbody>
    </table>
    {children}
  </section>
)

export default BoxScore
