From 95d19877069358d2c7d9e76abf4e466e4a75070c Mon Sep 17 00:00:00 2001 From: Muktazam Hasbi Ashidiqi Date: Tue, 23 Apr 2024 13:27:03 +0700 Subject: [PATCH] hotfix: register quiz on button click --- .../presentation/pages/quiz_registration_page.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/lib/features/quiz_registration/presentation/pages/quiz_registration_page.dart b/app/lib/features/quiz_registration/presentation/pages/quiz_registration_page.dart index 6d624b4..49afad9 100644 --- a/app/lib/features/quiz_registration/presentation/pages/quiz_registration_page.dart +++ b/app/lib/features/quiz_registration/presentation/pages/quiz_registration_page.dart @@ -368,6 +368,7 @@ class _QuizRegistrationPageState extends State { }, ); } + @override Widget build(BuildContext context) { return BebrasScaffold( @@ -425,8 +426,15 @@ class _QuizRegistrationPageState extends State { customButtonColor: const Color(0xFF1BB8E1), fontSize: 14, innerVerticalPadding: 14, - onTap: () async { - await context.push('/quiz_download'); + onTap: () { + setState(() => selectedWeek = 'running_weekly_quiz'); + context + .read() + .registerParticipant('siaga', selectedWeek); + checkNextWeeklyQuiz(); + checkRunningWeeklyQuiz(); + selectWeek(''); + context.push('/quiz_download'); }, text: 'Kerjakan Latihan Minggu Ini', ),