Public Access
fix: update exam route parameter format and improve question index calculation
Release Pipeline / build-and-release (push) Successful in 5m29s
Release Pipeline / build-and-release (push) Successful in 5m29s
This commit is contained in:
1 parent
29d9264cfb
commit
4f33444653
2 files changed
+2
-2
No files matched your search
@@ -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(() => {
|
||||
|
||||
Reference in new issue
Block a user