Skip to content

Commit 46961db

Browse files
committed
chore: enable world cup games for live sports
1 parent b80bef9 commit 46961db

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

app/components/UI/Predict/constants/sports.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export const SUPPORTED_SPORTS_LEAGUES: PredictSportsLeague[] = [
5050
'itc',
5151
'dfb',
5252
'cde',
53+
'fifwc',
5354
];
5455

5556
export const filterSupportedLeagues = (
@@ -98,6 +99,7 @@ const DRAW_CAPABLE_LEAGUES: ReadonlySet<PredictSportsLeague> = new Set([
9899
'itc',
99100
'dfb',
100101
'cde',
102+
'fifwc',
101103
]);
102104

103105
export const isDrawCapableLeague = (league: PredictSportsLeague): boolean =>

app/components/UI/Predict/types/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ export type PredictSportsLeague =
183183
| 'bol1'
184184
| 'itc'
185185
| 'dfb'
186-
| 'cde';
186+
| 'cde'
187+
| 'fifwc';
187188

188189
// Game status
189190
export type PredictGameStatus = 'scheduled' | 'ongoing' | 'ended';

app/components/UI/Predict/utils/gameParser.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ const LEAGUE_SLUG_CONFIGS: Record<PredictSportsLeague, LeagueSlugConfig> = {
207207
teamOrder: 'home-away',
208208
tagSlug: 'coupe-de-france',
209209
},
210+
fifwc: {
211+
pattern: /^fifwc-([a-z0-9]+)-([a-z0-9]+)-(\d{4}-\d{2}-\d{2})$/,
212+
teamOrder: 'home-away',
213+
tagSlug: 'fifa-world-cup',
214+
},
210215
};
211216

212217
export type TeamLookup = (

0 commit comments

Comments
 (0)