From 4f33444653087f5f6b155909ac12a5f16ed5296a Mon Sep 17 00:00:00 2001 From: LaurensBartelds Date: Sat, 25 Apr 2026 16:18:07 +0200 Subject: [PATCH] fix: update exam route parameter format and improve question index calculation --- frontend/src/App.tsx | 2 +- frontend/src/components/ExamRoute.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index fed3db7..289698d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -412,7 +412,7 @@ function AppInner() { } /> () 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(() => {