Skip to content

Commit fbd32a1

Browse files
committed
Add goal attempts to match info layout
1 parent 6d52cfc commit fbd32a1

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

dotcom-rendering/src/components/FootballMatchInfo.tsx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import type {
44
FootballMatchTeamWithStats,
55
} from '../footballMatchStats';
66
import type { FootballTable as FootballTableData } from '../footballTables';
7-
import { FootballMatchStat } from './FootballMatchStat';
7+
import {
8+
FootballMatchGoalAttempts,
9+
FootballMatchStat,
10+
} from './FootballMatchStat';
811
import { LeagueTable } from './LeagueTable';
912
import { Lineups } from './Lineups';
1013

@@ -56,7 +59,24 @@ export const FootballMatchInfo = ({ match, table }: Props) => {
5659
awayValue={match.awayTeam.possession}
5760
isPercentage={true}
5861
/>
59-
{/* Add Goal Attempts here */}
62+
<FootballMatchGoalAttempts
63+
homeTeam={{
64+
name: match.homeTeam.name,
65+
colour: match.homeTeam.statsColour,
66+
}}
67+
awayTeam={{
68+
name: match.awayTeam.name,
69+
colour: match.awayTeam.statsColour,
70+
}}
71+
homeValues={{
72+
onTarget: match.homeTeam.shotsOnTarget,
73+
offTarget: match.homeTeam.shotsOffTarget,
74+
}}
75+
awayValues={{
76+
onTarget: match.awayTeam.shotsOnTarget,
77+
offTarget: match.awayTeam.shotsOffTarget,
78+
}}
79+
/>
6080
<FootballMatchStat
6181
label="Corners"
6282
homeTeam={{

0 commit comments

Comments
 (0)