Skip to content

Commit

Permalink
[article] fix results in articles
Browse files Browse the repository at this point in the history
  • Loading branch information
BrightDV committed Jan 4, 2025
1 parent 95ac24d commit 4c141d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Screens/free_practice_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class FreePracticeResultsProvider extends StatelessWidget {
raceUrl != null
? int.parse(raceUrl!
.split('/')[9]
.replaceAll('practice-', '')
.replaceAll('practice', '')
.replaceAll('.html', ''))
: sessionIndex,
)
Expand Down
4 changes: 2 additions & 2 deletions lib/Screens/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class TestScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const ArticleScreen(
'6vBvcKe77Nh9Qjwfyh6wuT',
'starting grid',
'52fogZq77Kgmdt75WN8kGM',
'results',
true,
);
}
Expand Down
11 changes: 8 additions & 3 deletions lib/api/article_parts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -953,12 +953,11 @@ class AtomSessionResults extends StatelessWidget {
.substring(1),
),
'',
'',
element['fields']['meetingKey'],
int.parse(
element['fields']['season'],
),
element['fields']['meetingOfficialName'],
raceUrl: element['fields']['cta'],
)
: Scaffold(
appBar: AppBar(
Expand Down Expand Up @@ -1003,7 +1002,13 @@ class AtomSessionResults extends StatelessWidget {
element['fields']['sessionType'] ==
'Sprint'
? RaceResultsProvider(
raceUrl: element['fields']['cta'],
raceUrl: element['fields']
['sessionType'] ==
'Race'
? 'race'
: 'sprint',
raceId: element['fields']
['meetingKey'],
)
: SingleChildScrollView(
child: element['fields']
Expand Down

0 comments on commit 4c141d3

Please sign in to comment.