@times-components/ts-components 1.157.0 → 1.157.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/components/opta/football/opta-match-stats/stats-graphs/WidgetContainer.js +35 -9
- package/dist/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.js +2 -2
- package/dist/components/opta/football/opta-match-stats/summary/WidgetContainer.js +10 -10
- package/dist/components/opta/football/opta-match-stats/xG/OptaMatchStatsXG.js +4 -4
- package/dist/components/opta/football/opta-match-stats/xG/styles.js +2 -2
- package/dist/components/opta/shared/fixtures-ticker/OptaFixturesTicker.d.ts +1 -0
- package/dist/components/opta/shared/fixtures-ticker/OptaFixturesTicker.js +4 -3
- package/dist/components/opta/utils/useAddFixtureNavigation.d.ts +1 -0
- package/dist/components/opta/utils/useAddFixtureNavigation.js +12 -5
- package/package.json +3 -3
- package/rnw.js +1 -1
- package/src/components/opta/football/opta-match-stats/stats-graphs/WidgetContainer.tsx +34 -8
- package/src/components/opta/football/opta-match-stats/stats-graphs/__tests__/__snapshots__/OptaMatchStatsGraphs.test.tsx.snap +1 -1
- package/src/components/opta/football/opta-match-stats/summary/OptaMatchStatsSummary.tsx +1 -1
- package/src/components/opta/football/opta-match-stats/summary/WidgetContainer.tsx +9 -9
- package/src/components/opta/football/opta-match-stats/summary/__tests__/__snapshots__/OptaMatchStatsSummary.test.tsx.snap +1 -1
- package/src/components/opta/football/opta-match-stats/xG/OptaMatchStatsXG.tsx +12 -12
- package/src/components/opta/football/opta-match-stats/xG/__tests__/__snapshots__/OptaMatchStatsXG.test.tsx.snap +64 -64
- package/src/components/opta/football/opta-match-stats/xG/styles.ts +2 -2
- package/src/components/opta/shared/fixtures-ticker/OptaFixturesTicker.tsx +5 -2
- package/src/components/opta/utils/useAddFixtureNavigation.ts +15 -4
|
@@ -82,6 +82,22 @@ export const WidgetContainer = styled.div<{
|
|
|
82
82
|
overflow: hidden;
|
|
83
83
|
height: 40px;
|
|
84
84
|
|
|
85
|
+
&:nth-of-type(2) {
|
|
86
|
+
order: 5;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:nth-of-type(3) {
|
|
90
|
+
order: 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:nth-of-type(4) {
|
|
94
|
+
order: 3;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:nth-of-type(5) {
|
|
98
|
+
order: 4;
|
|
99
|
+
}
|
|
100
|
+
|
|
85
101
|
@media(min-width: ${breakpoints.medium}px) {
|
|
86
102
|
&:hover {
|
|
87
103
|
border: 1px solid ${colours.functional.black};
|
|
@@ -210,6 +226,9 @@ export const WidgetContainer = styled.div<{
|
|
|
210
226
|
}
|
|
211
227
|
|
|
212
228
|
.Opta-Stats-Bars-Text {
|
|
229
|
+
display: block;
|
|
230
|
+
width: 100%;
|
|
231
|
+
text-align: center;
|
|
213
232
|
font-family: Roboto, sans-serif;
|
|
214
233
|
font-weight: 600;
|
|
215
234
|
font-size: 16px;
|
|
@@ -241,7 +260,7 @@ export const WidgetContainer = styled.div<{
|
|
|
241
260
|
}
|
|
242
261
|
`}
|
|
243
262
|
position: relative;
|
|
244
|
-
&::
|
|
263
|
+
&::before {
|
|
245
264
|
content: ' ';
|
|
246
265
|
display: inline-block;
|
|
247
266
|
width: 2px;
|
|
@@ -255,7 +274,7 @@ export const WidgetContainer = styled.div<{
|
|
|
255
274
|
}
|
|
256
275
|
`}
|
|
257
276
|
position: absolute;
|
|
258
|
-
|
|
277
|
+
left: 0;
|
|
259
278
|
top: 0;
|
|
260
279
|
|
|
261
280
|
@media (max-width: ${maxMDBreakpoint}px) {
|
|
@@ -272,9 +291,9 @@ export const WidgetContainer = styled.div<{
|
|
|
272
291
|
background: ${awayTeamColor.dark} !important;
|
|
273
292
|
}
|
|
274
293
|
`}
|
|
275
|
-
padding-
|
|
294
|
+
padding-right: 3px;
|
|
276
295
|
position: relative;
|
|
277
|
-
&::
|
|
296
|
+
&::after {
|
|
278
297
|
content: ' ';
|
|
279
298
|
display: inline-block;
|
|
280
299
|
width: 2px;
|
|
@@ -288,7 +307,7 @@ export const WidgetContainer = styled.div<{
|
|
|
288
307
|
}
|
|
289
308
|
`}
|
|
290
309
|
position: absolute;
|
|
291
|
-
|
|
310
|
+
right: 0;
|
|
292
311
|
top: 0;
|
|
293
312
|
@media (max-width: ${maxMDBreakpoint}px) {
|
|
294
313
|
width: 1px;
|
|
@@ -311,8 +330,12 @@ export const WidgetContainer = styled.div<{
|
|
|
311
330
|
`}
|
|
312
331
|
|
|
313
332
|
tr {
|
|
333
|
+
display: flex;
|
|
334
|
+
align-items: center;
|
|
335
|
+
|
|
314
336
|
// Home team stat label
|
|
315
337
|
td:nth-of-type(1) {
|
|
338
|
+
order: 3;
|
|
316
339
|
color: ${homeTeamColor.light};
|
|
317
340
|
${props =>
|
|
318
341
|
props.isApp &&
|
|
@@ -341,7 +364,7 @@ export const WidgetContainer = styled.div<{
|
|
|
341
364
|
color: ${darkTextColor};
|
|
342
365
|
}
|
|
343
366
|
`}
|
|
344
|
-
|
|
367
|
+
right: 0;
|
|
345
368
|
transform: translateY(-25px);
|
|
346
369
|
&.Opta-Outer-bigger {
|
|
347
370
|
background-color: unset;
|
|
@@ -351,12 +374,15 @@ export const WidgetContainer = styled.div<{
|
|
|
351
374
|
|
|
352
375
|
// Stat bar
|
|
353
376
|
td:nth-of-type(2) {
|
|
377
|
+
order: 2;
|
|
354
378
|
width: 100%;
|
|
355
379
|
padding-inline: 0px;
|
|
356
380
|
@media (max-width: ${maxMDBreakpoint}px) {
|
|
357
381
|
padding-inline: 16px;
|
|
358
382
|
}
|
|
359
383
|
.Opta-Bars-Full {
|
|
384
|
+
display: flex;
|
|
385
|
+
flex-direction: row-reverse;
|
|
360
386
|
border-radius: 100px;
|
|
361
387
|
height: 8px;
|
|
362
388
|
.Opta-Percent {
|
|
@@ -367,6 +393,7 @@ export const WidgetContainer = styled.div<{
|
|
|
367
393
|
|
|
368
394
|
// Away team stat label
|
|
369
395
|
td:nth-of-type(3) {
|
|
396
|
+
order: 1;
|
|
370
397
|
color: ${awayTeamColor.light};
|
|
371
398
|
${props =>
|
|
372
399
|
props.isApp &&
|
|
@@ -395,7 +422,7 @@ export const WidgetContainer = styled.div<{
|
|
|
395
422
|
color: ${darkTextColor};
|
|
396
423
|
}
|
|
397
424
|
`}
|
|
398
|
-
|
|
425
|
+
left: 0;
|
|
399
426
|
transform: translateY(-25px);
|
|
400
427
|
&.Opta-Outer-bigger {
|
|
401
428
|
background-color: unset;
|
|
@@ -430,6 +457,5 @@ export const WidgetContainer = styled.div<{
|
|
|
430
457
|
}
|
|
431
458
|
}
|
|
432
459
|
}
|
|
433
|
-
}
|
|
434
460
|
}
|
|
435
461
|
`;
|
|
@@ -57,6 +57,7 @@ export const WidgetContainer = styled.div<{
|
|
|
57
57
|
order: 2;
|
|
58
58
|
width: 100%;
|
|
59
59
|
display: flex;
|
|
60
|
+
flex-direction: row-reverse;
|
|
60
61
|
align-items: center;
|
|
61
62
|
padding-inline: 20px;
|
|
62
63
|
|
|
@@ -71,13 +72,13 @@ export const WidgetContainer = styled.div<{
|
|
|
71
72
|
width: 44px;
|
|
72
73
|
}
|
|
73
74
|
.Opta-Crest.Opta-Home {
|
|
74
|
-
margin-
|
|
75
|
-
margin-
|
|
75
|
+
margin-left: auto;
|
|
76
|
+
margin-right: 8px;
|
|
76
77
|
|
|
77
78
|
}
|
|
78
79
|
.Opta-Crest.Opta-Away {
|
|
79
|
-
margin-
|
|
80
|
-
margin-
|
|
80
|
+
margin-right: auto;
|
|
81
|
+
margin-left: 8px;
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -114,13 +115,13 @@ export const WidgetContainer = styled.div<{
|
|
|
114
115
|
top: 78px;
|
|
115
116
|
width: 50%;
|
|
116
117
|
&.Opta-Home {
|
|
117
|
-
left: 0px;
|
|
118
|
-
text-align: left;
|
|
119
|
-
}
|
|
120
|
-
&.Opta-Away {
|
|
121
118
|
right: 0px;
|
|
122
119
|
text-align: right;
|
|
123
120
|
}
|
|
121
|
+
&.Opta-Away {
|
|
122
|
+
left: 0px;
|
|
123
|
+
text-align: left;
|
|
124
|
+
}
|
|
124
125
|
|
|
125
126
|
font-family: ${fonts.supporting};
|
|
126
127
|
font-size: 16px;
|
|
@@ -411,6 +412,5 @@ export const WidgetContainer = styled.div<{
|
|
|
411
412
|
content: ")";
|
|
412
413
|
}
|
|
413
414
|
}
|
|
414
|
-
}
|
|
415
415
|
}
|
|
416
416
|
`;
|
|
@@ -173,6 +173,14 @@ export const OptaMatchStatsXG: React.FC<{
|
|
|
173
173
|
|
|
174
174
|
return (
|
|
175
175
|
<XGWrapper isApp={isApp}>
|
|
176
|
+
<XGValueBadge
|
|
177
|
+
area="away"
|
|
178
|
+
isWinner={awayIsWinner}
|
|
179
|
+
teamColor={awayColor}
|
|
180
|
+
isApp={isApp}
|
|
181
|
+
>
|
|
182
|
+
{formatValue(awayTeam.value, isInteger)}
|
|
183
|
+
</XGValueBadge>
|
|
176
184
|
<XGValueBadge
|
|
177
185
|
area="home"
|
|
178
186
|
isWinner={homeIsWinner}
|
|
@@ -182,25 +190,17 @@ export const OptaMatchStatsXG: React.FC<{
|
|
|
182
190
|
{formatValue(homeTeam.value, isInteger)}
|
|
183
191
|
</XGValueBadge>
|
|
184
192
|
<XGTitle isApp={isApp}>{resolvedTitle}</XGTitle>
|
|
185
|
-
<XGValueBadge
|
|
186
|
-
area="away"
|
|
187
|
-
isWinner={awayIsWinner}
|
|
188
|
-
teamColor={awayColor}
|
|
189
|
-
isApp={isApp}
|
|
190
|
-
>
|
|
191
|
-
{formatValue(awayTeam.value, isInteger)}
|
|
192
|
-
</XGValueBadge>
|
|
193
193
|
<XGBarTrack>
|
|
194
194
|
<XGBarFill
|
|
195
195
|
side="home"
|
|
196
|
-
percent={
|
|
197
|
-
teamColor={
|
|
196
|
+
percent={awayPercent}
|
|
197
|
+
teamColor={awayColor}
|
|
198
198
|
isApp={isApp}
|
|
199
199
|
/>
|
|
200
200
|
<XGBarFill
|
|
201
201
|
side="away"
|
|
202
|
-
percent={
|
|
203
|
-
teamColor={
|
|
202
|
+
percent={homePercent}
|
|
203
|
+
teamColor={homeColor}
|
|
204
204
|
isApp={isApp}
|
|
205
205
|
/>
|
|
206
206
|
</XGBarTrack>
|
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
exports[`OptaMatchStatsXG renders snapshot for all four stats combined 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
|
-
class="sc-bwzfXH
|
|
6
|
+
class="sc-bwzfXH dsTFzT"
|
|
7
7
|
>
|
|
8
|
+
<span
|
|
9
|
+
class="sc-bxivhb fxnaTd"
|
|
10
|
+
>
|
|
11
|
+
1.20
|
|
12
|
+
</span>
|
|
8
13
|
<span
|
|
9
14
|
class="sc-bxivhb eQOylx"
|
|
10
15
|
>
|
|
@@ -15,25 +20,25 @@ exports[`OptaMatchStatsXG renders snapshot for all four stats combined 1`] = `
|
|
|
15
20
|
>
|
|
16
21
|
xG
|
|
17
22
|
</h3>
|
|
18
|
-
<span
|
|
19
|
-
class="sc-bxivhb fxnaTd"
|
|
20
|
-
>
|
|
21
|
-
1.20
|
|
22
|
-
</span>
|
|
23
23
|
<div
|
|
24
24
|
class="sc-ifAKCX cGTJPD"
|
|
25
25
|
>
|
|
26
26
|
<div
|
|
27
|
-
class="sc-EHOje
|
|
27
|
+
class="sc-EHOje efCtwH"
|
|
28
28
|
/>
|
|
29
29
|
<div
|
|
30
|
-
class="sc-EHOje
|
|
30
|
+
class="sc-EHOje ivhXJp"
|
|
31
31
|
/>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
34
34
|
<div
|
|
35
|
-
class="sc-bwzfXH
|
|
35
|
+
class="sc-bwzfXH dsTFzT"
|
|
36
36
|
>
|
|
37
|
+
<span
|
|
38
|
+
class="sc-bxivhb fxnaTd"
|
|
39
|
+
>
|
|
40
|
+
0.80
|
|
41
|
+
</span>
|
|
37
42
|
<span
|
|
38
43
|
class="sc-bxivhb eQOylx"
|
|
39
44
|
>
|
|
@@ -44,25 +49,25 @@ exports[`OptaMatchStatsXG renders snapshot for all four stats combined 1`] = `
|
|
|
44
49
|
>
|
|
45
50
|
xG from open play
|
|
46
51
|
</h3>
|
|
47
|
-
<span
|
|
48
|
-
class="sc-bxivhb fxnaTd"
|
|
49
|
-
>
|
|
50
|
-
0.80
|
|
51
|
-
</span>
|
|
52
52
|
<div
|
|
53
53
|
class="sc-ifAKCX cGTJPD"
|
|
54
54
|
>
|
|
55
55
|
<div
|
|
56
|
-
class="sc-EHOje
|
|
56
|
+
class="sc-EHOje jlJsBt"
|
|
57
57
|
/>
|
|
58
58
|
<div
|
|
59
|
-
class="sc-EHOje
|
|
59
|
+
class="sc-EHOje gsbBzm"
|
|
60
60
|
/>
|
|
61
61
|
</div>
|
|
62
62
|
</div>
|
|
63
63
|
<div
|
|
64
|
-
class="sc-bwzfXH
|
|
64
|
+
class="sc-bwzfXH dsTFzT"
|
|
65
65
|
>
|
|
66
|
+
<span
|
|
67
|
+
class="sc-bxivhb kdaltZ"
|
|
68
|
+
>
|
|
69
|
+
0.40
|
|
70
|
+
</span>
|
|
66
71
|
<span
|
|
67
72
|
class="sc-bxivhb lmMNBc"
|
|
68
73
|
>
|
|
@@ -73,25 +78,25 @@ exports[`OptaMatchStatsXG renders snapshot for all four stats combined 1`] = `
|
|
|
73
78
|
>
|
|
74
79
|
xG from set play
|
|
75
80
|
</h3>
|
|
76
|
-
<span
|
|
77
|
-
class="sc-bxivhb kdaltZ"
|
|
78
|
-
>
|
|
79
|
-
0.40
|
|
80
|
-
</span>
|
|
81
81
|
<div
|
|
82
82
|
class="sc-ifAKCX cGTJPD"
|
|
83
83
|
>
|
|
84
84
|
<div
|
|
85
|
-
class="sc-EHOje
|
|
85
|
+
class="sc-EHOje bbCkQx"
|
|
86
86
|
/>
|
|
87
87
|
<div
|
|
88
|
-
class="sc-EHOje
|
|
88
|
+
class="sc-EHOje cgYgyY"
|
|
89
89
|
/>
|
|
90
90
|
</div>
|
|
91
91
|
</div>
|
|
92
92
|
<div
|
|
93
|
-
class="sc-bwzfXH
|
|
93
|
+
class="sc-bwzfXH dsTFzT"
|
|
94
94
|
>
|
|
95
|
+
<span
|
|
96
|
+
class="sc-bxivhb kdaltZ"
|
|
97
|
+
>
|
|
98
|
+
32
|
|
99
|
+
</span>
|
|
95
100
|
<span
|
|
96
101
|
class="sc-bxivhb lmMNBc"
|
|
97
102
|
>
|
|
@@ -102,19 +107,14 @@ exports[`OptaMatchStatsXG renders snapshot for all four stats combined 1`] = `
|
|
|
102
107
|
>
|
|
103
108
|
Touches in opposition box
|
|
104
109
|
</h3>
|
|
105
|
-
<span
|
|
106
|
-
class="sc-bxivhb kdaltZ"
|
|
107
|
-
>
|
|
108
|
-
32
|
|
109
|
-
</span>
|
|
110
110
|
<div
|
|
111
111
|
class="sc-ifAKCX cGTJPD"
|
|
112
112
|
>
|
|
113
113
|
<div
|
|
114
|
-
class="sc-EHOje
|
|
114
|
+
class="sc-EHOje fVikHJ"
|
|
115
115
|
/>
|
|
116
116
|
<div
|
|
117
|
-
class="sc-EHOje
|
|
117
|
+
class="sc-EHOje iZqqyH"
|
|
118
118
|
/>
|
|
119
119
|
</div>
|
|
120
120
|
</div>
|
|
@@ -124,8 +124,13 @@ exports[`OptaMatchStatsXG renders snapshot for all four stats combined 1`] = `
|
|
|
124
124
|
exports[`OptaMatchStatsXG renders snapshot for touchesInOppBox 1`] = `
|
|
125
125
|
<DocumentFragment>
|
|
126
126
|
<div
|
|
127
|
-
class="sc-bwzfXH
|
|
127
|
+
class="sc-bwzfXH dsTFzT"
|
|
128
128
|
>
|
|
129
|
+
<span
|
|
130
|
+
class="sc-bxivhb kdaltZ"
|
|
131
|
+
>
|
|
132
|
+
32
|
|
133
|
+
</span>
|
|
129
134
|
<span
|
|
130
135
|
class="sc-bxivhb lmMNBc"
|
|
131
136
|
>
|
|
@@ -136,19 +141,14 @@ exports[`OptaMatchStatsXG renders snapshot for touchesInOppBox 1`] = `
|
|
|
136
141
|
>
|
|
137
142
|
Touches in opposition box
|
|
138
143
|
</h3>
|
|
139
|
-
<span
|
|
140
|
-
class="sc-bxivhb kdaltZ"
|
|
141
|
-
>
|
|
142
|
-
32
|
|
143
|
-
</span>
|
|
144
144
|
<div
|
|
145
145
|
class="sc-ifAKCX cGTJPD"
|
|
146
146
|
>
|
|
147
147
|
<div
|
|
148
|
-
class="sc-EHOje
|
|
148
|
+
class="sc-EHOje fVikHJ"
|
|
149
149
|
/>
|
|
150
150
|
<div
|
|
151
|
-
class="sc-EHOje
|
|
151
|
+
class="sc-EHOje iZqqyH"
|
|
152
152
|
/>
|
|
153
153
|
</div>
|
|
154
154
|
</div>
|
|
@@ -158,8 +158,13 @@ exports[`OptaMatchStatsXG renders snapshot for touchesInOppBox 1`] = `
|
|
|
158
158
|
exports[`OptaMatchStatsXG renders snapshot with custom feed values 1`] = `
|
|
159
159
|
<DocumentFragment>
|
|
160
160
|
<div
|
|
161
|
-
class="sc-bwzfXH
|
|
161
|
+
class="sc-bwzfXH dsTFzT"
|
|
162
162
|
>
|
|
163
|
+
<span
|
|
164
|
+
class="sc-bxivhb fxnaTd"
|
|
165
|
+
>
|
|
166
|
+
1.30
|
|
167
|
+
</span>
|
|
163
168
|
<span
|
|
164
169
|
class="sc-bxivhb eQOylx"
|
|
165
170
|
>
|
|
@@ -170,19 +175,14 @@ exports[`OptaMatchStatsXG renders snapshot with custom feed values 1`] = `
|
|
|
170
175
|
>
|
|
171
176
|
xG
|
|
172
177
|
</h3>
|
|
173
|
-
<span
|
|
174
|
-
class="sc-bxivhb fxnaTd"
|
|
175
|
-
>
|
|
176
|
-
1.30
|
|
177
|
-
</span>
|
|
178
178
|
<div
|
|
179
179
|
class="sc-ifAKCX cGTJPD"
|
|
180
180
|
>
|
|
181
181
|
<div
|
|
182
|
-
class="sc-EHOje
|
|
182
|
+
class="sc-EHOje fXoxLM"
|
|
183
183
|
/>
|
|
184
184
|
<div
|
|
185
|
-
class="sc-EHOje
|
|
185
|
+
class="sc-EHOje uZEXy"
|
|
186
186
|
/>
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
@@ -192,8 +192,13 @@ exports[`OptaMatchStatsXG renders snapshot with custom feed values 1`] = `
|
|
|
192
192
|
exports[`OptaMatchStatsXG renders snapshot with feed data 1`] = `
|
|
193
193
|
<DocumentFragment>
|
|
194
194
|
<div
|
|
195
|
-
class="sc-bwzfXH
|
|
195
|
+
class="sc-bwzfXH dsTFzT"
|
|
196
196
|
>
|
|
197
|
+
<span
|
|
198
|
+
class="sc-bxivhb fxnaTd"
|
|
199
|
+
>
|
|
200
|
+
1.20
|
|
201
|
+
</span>
|
|
197
202
|
<span
|
|
198
203
|
class="sc-bxivhb eQOylx"
|
|
199
204
|
>
|
|
@@ -204,19 +209,14 @@ exports[`OptaMatchStatsXG renders snapshot with feed data 1`] = `
|
|
|
204
209
|
>
|
|
205
210
|
xG
|
|
206
211
|
</h3>
|
|
207
|
-
<span
|
|
208
|
-
class="sc-bxivhb fxnaTd"
|
|
209
|
-
>
|
|
210
|
-
1.20
|
|
211
|
-
</span>
|
|
212
212
|
<div
|
|
213
213
|
class="sc-ifAKCX cGTJPD"
|
|
214
214
|
>
|
|
215
215
|
<div
|
|
216
|
-
class="sc-EHOje
|
|
216
|
+
class="sc-EHOje efCtwH"
|
|
217
217
|
/>
|
|
218
218
|
<div
|
|
219
|
-
class="sc-EHOje
|
|
219
|
+
class="sc-EHOje ivhXJp"
|
|
220
220
|
/>
|
|
221
221
|
</div>
|
|
222
222
|
</div>
|
|
@@ -226,8 +226,13 @@ exports[`OptaMatchStatsXG renders snapshot with feed data 1`] = `
|
|
|
226
226
|
exports[`OptaMatchStatsXG renders snapshot with isApp=true 1`] = `
|
|
227
227
|
<DocumentFragment>
|
|
228
228
|
<div
|
|
229
|
-
class="sc-bwzfXH
|
|
229
|
+
class="sc-bwzfXH gqQsSR"
|
|
230
230
|
>
|
|
231
|
+
<span
|
|
232
|
+
class="sc-bxivhb esJvdJ"
|
|
233
|
+
>
|
|
234
|
+
1.20
|
|
235
|
+
</span>
|
|
231
236
|
<span
|
|
232
237
|
class="sc-bxivhb jRrAmL"
|
|
233
238
|
>
|
|
@@ -238,19 +243,14 @@ exports[`OptaMatchStatsXG renders snapshot with isApp=true 1`] = `
|
|
|
238
243
|
>
|
|
239
244
|
xG
|
|
240
245
|
</h3>
|
|
241
|
-
<span
|
|
242
|
-
class="sc-bxivhb esJvdJ"
|
|
243
|
-
>
|
|
244
|
-
1.20
|
|
245
|
-
</span>
|
|
246
246
|
<div
|
|
247
247
|
class="sc-ifAKCX cGTJPD"
|
|
248
248
|
>
|
|
249
249
|
<div
|
|
250
|
-
class="sc-EHOje
|
|
250
|
+
class="sc-EHOje chjQMW"
|
|
251
251
|
/>
|
|
252
252
|
<div
|
|
253
|
-
class="sc-EHOje
|
|
253
|
+
class="sc-EHOje fVQznw"
|
|
254
254
|
/>
|
|
255
255
|
</div>
|
|
256
256
|
</div>
|
|
@@ -11,7 +11,7 @@ export const XGWrapper = styled.div<{ isApp: boolean }>`
|
|
|
11
11
|
background-color: ${colours.functional.greenLight};
|
|
12
12
|
display: grid;
|
|
13
13
|
grid-template-areas:
|
|
14
|
-
'
|
|
14
|
+
'away title home'
|
|
15
15
|
'bar bar bar';
|
|
16
16
|
grid-template-columns: auto 1fr auto;
|
|
17
17
|
align-items: center;
|
|
@@ -22,7 +22,7 @@ export const XGWrapper = styled.div<{ isApp: boolean }>`
|
|
|
22
22
|
padding: 0 16px;
|
|
23
23
|
grid-template-areas:
|
|
24
24
|
'. title .'
|
|
25
|
-
'
|
|
25
|
+
'away bar home';
|
|
26
26
|
grid-template-columns: 65px 1fr 65px;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -32,6 +32,7 @@ export type OptaFixturesTickerProps = {
|
|
|
32
32
|
fixturesPageUrl?: string;
|
|
33
33
|
sport: OptaSport;
|
|
34
34
|
enableMatchStatsNavigation?: 'true' | 'false';
|
|
35
|
+
matchStatsBasePath?: string;
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
export const OptaFixturesTicker: React.FC<OptaFixturesTickerProps> = React.memo(
|
|
@@ -47,7 +48,8 @@ export const OptaFixturesTicker: React.FC<OptaFixturesTickerProps> = React.memo(
|
|
|
47
48
|
showButtons,
|
|
48
49
|
fixturesPageUrl,
|
|
49
50
|
sport,
|
|
50
|
-
enableMatchStatsNavigation = 'false'
|
|
51
|
+
enableMatchStatsNavigation = 'false',
|
|
52
|
+
matchStatsBasePath
|
|
51
53
|
}) => {
|
|
52
54
|
const ref = React.createRef<HTMLDivElement>();
|
|
53
55
|
const isNationalComp = isNationalCompetition(competition, sport);
|
|
@@ -109,7 +111,8 @@ export const OptaFixturesTicker: React.FC<OptaFixturesTickerProps> = React.memo(
|
|
|
109
111
|
ref,
|
|
110
112
|
sport,
|
|
111
113
|
competition,
|
|
112
|
-
season
|
|
114
|
+
season,
|
|
115
|
+
matchStatsBasePath
|
|
113
116
|
});
|
|
114
117
|
|
|
115
118
|
return (
|
|
@@ -5,11 +5,12 @@ export const useAddFixtureNavigation = (args: {
|
|
|
5
5
|
sport: string;
|
|
6
6
|
competition: string;
|
|
7
7
|
season: string;
|
|
8
|
+
matchStatsBasePath?: string;
|
|
8
9
|
}) => {
|
|
9
|
-
const { ref, sport, competition, season } = args;
|
|
10
|
+
const { ref, sport, competition, season, matchStatsBasePath } = args;
|
|
10
11
|
useEffect(
|
|
11
12
|
() => {
|
|
12
|
-
updateTimestamps(ref, sport, competition, season);
|
|
13
|
+
updateTimestamps(ref, sport, competition, season, matchStatsBasePath);
|
|
13
14
|
},
|
|
14
15
|
[ref]
|
|
15
16
|
);
|
|
@@ -30,7 +31,8 @@ const updateTimestamps = (
|
|
|
30
31
|
element: RefObject<HTMLDivElement>,
|
|
31
32
|
sport: string,
|
|
32
33
|
competition: string,
|
|
33
|
-
season: string
|
|
34
|
+
season: string,
|
|
35
|
+
matchStatsBasePath?: string
|
|
34
36
|
) => {
|
|
35
37
|
let count = 0;
|
|
36
38
|
const updateTimestampsInterval = setInterval(() => {
|
|
@@ -76,7 +78,16 @@ const updateTimestamps = (
|
|
|
76
78
|
|
|
77
79
|
const isAndroid = safeWindow.Android && safeWindow.Android.postMessage;
|
|
78
80
|
|
|
79
|
-
const
|
|
81
|
+
const baseMatchStatsPath =
|
|
82
|
+
matchStatsBasePath || `/sport/${sport}/match-stats`;
|
|
83
|
+
const navigationUrl =
|
|
84
|
+
`${baseMatchStatsPath}?competition=${competition}` +
|
|
85
|
+
`&season=${season}` +
|
|
86
|
+
`&match=${match}` +
|
|
87
|
+
`&status=${status}` +
|
|
88
|
+
`&homeTeam=${homeTeam}` +
|
|
89
|
+
`&awayTeam=${awayTeam}` +
|
|
90
|
+
'&enableMatchStats=true';
|
|
80
91
|
const appMessage = {
|
|
81
92
|
type: 'openPage',
|
|
82
93
|
title: 'Football',
|