pdf-quiz-generator/frontend
Daniel 9def89aac3 Fix mobile correct answer not recognized — race condition in startQuiz
Root cause: setQuizMode(mode) was called BEFORE the network fetch completed.
React immediately re-rendered showing the quiz, but quiz.questions still had
the initial load data (without correct_answer for study mode). On fast desktop
networks the fetch completed before the user could tap; on slower mobile
networks the user tapped an option while correct_answer was still null,
making every answer appear incorrect.

Fix: setQuizMode(mode) moved to AFTER setQuiz(quizRes.data) and
setAttemptId(). The ModeSelectScreen stays visible while data loads,
then switches to the quiz view only when all data (including
correct_answer) is ready.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 17:45:43 +02:00
..
src Fix mobile correct answer not recognized — race condition in startQuiz 2026-04-01 17:45:43 +02:00
.dockerignore Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
Dockerfile Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
index.html Better fonts, hamburger mobile nav, jobs indicator, warm theme refinement 2026-04-01 02:14:18 +02:00
nginx.conf Major: categories, question bank, security fixes, mobile layout, UX improvements 2026-03-31 20:08:05 +02:00
package.json Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00
vite.config.js Initial commit: PDF Quiz Generator app 2026-03-30 20:04:53 +00:00