@@ -18,7 +18,7 @@ import { palette } from '../palette';
1818import Union from '../static/icons/Union.svg' ;
1919
2020type Props = {
21- matchStats : FootballMatchStats ;
21+ matchStats ? : FootballMatchStats ;
2222} ;
2323
2424const lineupSectionId = 'lineups' ;
@@ -32,33 +32,41 @@ export const Lineups = ({ matchStats }: Props) => {
3232 aria-labelledby = { lineupSectionId }
3333 >
3434 < Title text = "Lineups" id = { lineupSectionId } />
35- < PlayerList
36- team = { matchStats . homeTeam }
37- isSubstitute = { false }
38- isHome = { true }
39- />
40- < PlayerList
41- team = { matchStats . awayTeam }
42- isSubstitute = { false }
43- isHome = { false }
44- />
45- </ section >
46- < section
47- css = { playerListSectionGridStyles }
48- aria-labelledby = { substitutesSectionId }
49- >
50- < Title text = "Substitutes" id = { substitutesSectionId } />
51- < PlayerList
52- team = { matchStats . homeTeam }
53- isSubstitute = { true }
54- isHome = { true }
55- />
56- < PlayerList
57- team = { matchStats . awayTeam }
58- isSubstitute = { true }
59- isHome = { false }
60- />
35+ { matchStats ? (
36+ < >
37+ < PlayerList
38+ team = { matchStats . homeTeam }
39+ isSubstitute = { false }
40+ isHome = { true }
41+ />
42+ < PlayerList
43+ team = { matchStats . awayTeam }
44+ isSubstitute = { false }
45+ isHome = { false }
46+ /> { ' ' }
47+ </ >
48+ ) : (
49+ < span css = { comingSoon } > Coming soon</ span >
50+ ) }
6151 </ section >
52+ { matchStats && (
53+ < section
54+ css = { playerListSectionGridStyles }
55+ aria-labelledby = { substitutesSectionId }
56+ >
57+ < Title text = "Substitutes" id = { substitutesSectionId } />
58+ < PlayerList
59+ team = { matchStats . homeTeam }
60+ isSubstitute = { true }
61+ isHome = { true }
62+ />
63+ < PlayerList
64+ team = { matchStats . awayTeam }
65+ isSubstitute = { true }
66+ isHome = { false }
67+ />
68+ </ section >
69+ ) }
6270 </ section >
6371 ) ;
6472} ;
@@ -154,9 +162,8 @@ const PlayerList = ({
154162const sectionStyles = css `
155163 border : 1px solid ${ palette ( '--football-match-stat-border' ) } ;
156164 border-radius : 6px ;
157-
158165 padding-top : 6px ;
159-
166+ color : ${ palette ( '--football-match-stat-text' ) } ;
160167 background-color : ${ palette ( '--football-match-info-background' ) } ;
161168` ;
162169
@@ -190,7 +197,6 @@ const shirtNumber = css`
190197 display : inline-block;
191198 width : ${ space [ 5 ] } px;
192199 ${ textSansBold14 }
193- color : ${ palette ( '--football-match-stat-text' ) } ;
194200 ${ from . desktop } {
195201 ${ textSansBold15 }
196202 }
@@ -213,7 +219,14 @@ const playerName = css`
213219 ${ from . desktop } {
214220 ${ textSans15 }
215221 }
216- color : ${ palette ( '--football-match-stat-text' ) } ;
222+ ` ;
223+
224+ const comingSoon = css `
225+ padding-top : ${ space [ 2 ] } px;
226+ ${ textSans14 }
227+ ${ from . desktop } {
228+ ${ textSans15 }
229+ }
217230` ;
218231
219232const BackgroundRed = sourcePalette . news [ 400 ] ;
0 commit comments