@@ -25,40 +25,52 @@ const lineupSectionId = 'lineups';
2525const substitutesSectionId = 'substitutes' ;
2626
2727export const Lineups = ( { matchStats } : Props ) => {
28+ const lineupAvailable =
29+ matchStats . homeTeam . players . length > 0 &&
30+ matchStats . awayTeam . players . length > 0 ;
31+
2832 return (
2933 < section css = { sectionStyles } aria-label = "Team Lineups and Substitutes" >
3034 < section
3135 css = { playerListSectionGridStyles }
3236 aria-labelledby = { lineupSectionId }
3337 >
3438 < 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- />
39+ { lineupAvailable ? (
40+ < >
41+ < PlayerList
42+ team = { matchStats . homeTeam }
43+ isSubstitute = { false }
44+ isHome = { true }
45+ />
46+ < PlayerList
47+ team = { matchStats . awayTeam }
48+ isSubstitute = { false }
49+ isHome = { false }
50+ /> { ' ' }
51+ </ >
52+ ) : (
53+ < span css = { comingSoon } > Coming soon</ span >
54+ ) }
6155 </ section >
56+ { lineupAvailable && (
57+ < section
58+ css = { playerListSectionGridStyles }
59+ aria-labelledby = { substitutesSectionId }
60+ >
61+ < Title text = "Substitutes" id = { substitutesSectionId } />
62+ < PlayerList
63+ team = { matchStats . homeTeam }
64+ isSubstitute = { true }
65+ isHome = { true }
66+ />
67+ < PlayerList
68+ team = { matchStats . awayTeam }
69+ isSubstitute = { true }
70+ isHome = { false }
71+ />
72+ </ section >
73+ ) }
6274 </ section >
6375 ) ;
6476} ;
@@ -154,9 +166,8 @@ const PlayerList = ({
154166const sectionStyles = css `
155167 border : 1px solid ${ palette ( '--football-match-stat-border' ) } ;
156168 border-radius : 6px ;
157-
158169 padding-top : 6px ;
159-
170+ color : ${ palette ( '--football-match-stat-text' ) } ;
160171 background-color : ${ palette ( '--football-match-info-background' ) } ;
161172` ;
162173
@@ -190,7 +201,6 @@ const shirtNumber = css`
190201 display : inline-block;
191202 width : ${ space [ 5 ] } px;
192203 ${ textSansBold14 }
193- color : ${ palette ( '--football-match-stat-text' ) } ;
194204 ${ from . desktop } {
195205 ${ textSansBold15 }
196206 }
@@ -213,7 +223,14 @@ const playerName = css`
213223 ${ from . desktop } {
214224 ${ textSans15 }
215225 }
216- color : ${ palette ( '--football-match-stat-text' ) } ;
226+ ` ;
227+
228+ const comingSoon = css `
229+ padding-top : ${ space [ 2 ] } px;
230+ ${ textSans14 }
231+ ${ from . desktop } {
232+ ${ textSans15 }
233+ }
217234` ;
218235
219236const BackgroundRed = sourcePalette . news [ 400 ] ;
0 commit comments