Skip to content

Commit 54bd9b5

Browse files
committed
Update match info to use new stat props
1 parent 1cf8d50 commit 54bd9b5

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

dotcom-rendering/src/components/FootballMatchInfo.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ export const FootballMatchInfo = ({ match, table }: Props) => {
4242
match={match}
4343
homeValue={match.homeTeam.possession}
4444
awayValue={match.awayTeam.possession}
45+
isPercentage={true}
4546
/>
4647
{/* Add Goal Attempts here */}
4748
<StatsContainer
48-
label="Corrners"
49+
label="Corners"
4950
match={match}
5051
homeValue={match.homeTeam.corners}
5152
awayValue={match.awayTeam.corners}
@@ -86,11 +87,13 @@ const StatsContainer = ({
8687
match,
8788
homeValue,
8889
awayValue,
90+
isPercentage = false,
8991
}: {
9092
label: string;
9193
match: FootballMatchStats;
9294
homeValue: number;
9395
awayValue: number;
96+
isPercentage?: boolean;
9497
}) => (
9598
<div
9699
css={css`
@@ -100,16 +103,17 @@ const StatsContainer = ({
100103
>
101104
<FootballMatchStat
102105
label={label}
103-
home={{
104-
teamName: match.homeTeam.name,
105-
teamColour: match.homeTeam.statsColour,
106-
value: homeValue,
106+
homeTeam={{
107+
name: match.homeTeam.name,
108+
colour: match.homeTeam.statsColour,
107109
}}
108-
away={{
109-
teamName: match.awayTeam.name,
110-
teamColour: match.awayTeam.statsColour,
111-
value: awayValue,
110+
awayTeam={{
111+
name: match.awayTeam.name,
112+
colour: match.awayTeam.statsColour,
112113
}}
114+
homeValue={homeValue}
115+
awayValue={awayValue}
116+
isPercentage={isPercentage}
113117
/>
114118
</div>
115119
);

0 commit comments

Comments
 (0)