fix: update exam route parameter format and improve question index calculation
Release Pipeline / build-and-release (push) Successful in 5m29s

This commit is contained in:
LaurensBartelds committed 2026-04-25 16:18:07 +02:00
1 parent 29d9264cfb
commit 4f33444653
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ export default function ExamRoute({ exam, examState, onActivate, setExamState, o
const { slug, n } = useParams<{ slug: string; n: string }>()
const navigate = useNavigate()
const questionIdx = Math.max(0, (Number(n) || 1) - 1)
const questionIdx = Math.max(0, (Number((n ?? '').replace(/^q/, '')) || 1) - 1)
// Deep link: restore from localStorage if no exam is active on mount
useEffect(() => {