Skip to content

Commit

Permalink
Add away details
Browse files Browse the repository at this point in the history
  • Loading branch information
HoorayJorge committed Oct 3, 2022
1 parent 70b8ea2 commit 104d559
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions src/components/Scoreboard.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import React from 'react'


const Scoreboard = ({ heat, logo, shortName, abbreviation, clock, homeScore, awayScore, network, detail, channel, start }) => {
const Scoreboard = ({ heat, homeLogo, awayLogo, shortName, homeAbbreviation, awayAbbreviation, clock, homeScore, awayScore, network, detail, channel, start }) => {
return (
<tr>
<td>{heat}</td>
<td className="badge-td">
<img src={logo} alt={abbreviation} />
<img src={awayLogo} alt={homeAbbreviation} />
</td>
<td className="badge-td">
<img src={homeLogo} alt={awayAbbreviation} />
</td>
<td>{shortName}</td>
<td>{clock}</td>
<td>{homeScore}</td>
<td>{awayScore}</td>
<td>{homeScore}</td>
<td>{network}</td>
<td>{detail}</td>
<td>{channel}</td>
Expand Down
11 changes: 7 additions & 4 deletions src/views/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ export function App() {

return rows.push(
{
logo: item.competitions[0].competitors[0].team.logo,
abbreviation: item.competitions[0].competitors[0].team.abbreviation,
awayLogo: item.competitions[0].competitors[1].team.logo,
homeLogo: item.competitions[0].competitors[0].team.logo,
homeAbbreviation: item.competitions[0].competitors[0].team.abbreviation,
awayAbbreviation: item.competitions[0].competitors[1].team.abbreviation,
shortName: item.shortName,
clock: item.status.displayClock,
homeScore: item.competitions[0].competitors[0].score,
Expand Down Expand Up @@ -91,11 +93,12 @@ export function App() {
<thead className='bg-light'>
<tr>
<th className="position">Heat</th>
<th className="team">Away Logo</th>
<th className="team">Home Logo</th>
<th className="shortname">Shortname</th>
<th className="played">Clock</th>
<th className="won">Home Score</th>
<th className="draw">Away Score</th>
<th className="won">Away Score</th>
<th className="draw">Home Score</th>
<th className="lost">Network</th>
<th className="lost">Status</th>
<th className="lost">DirecTV Channel</th>
Expand Down

0 comments on commit 104d559

Please sign in to comment.