Harden private media and backup recovery; add V2 deployment and migration guides

This commit is contained in:
Elijah 2026-11-11 19:31:32 -07:00
parent c549c34f60
commit ffaa1f6afa
19 changed files with 623 additions and 14 deletions

View file

@ -132,6 +132,7 @@ export function QuizRunner(p: RunnerProps) {
const tick = useLatest(p.onTick);
const finish = useLatest(p.onFinish);
const elapsedRef = useLatest(elapsed);
const autoSubmitted = useRef(false);
const total = p.questions.length;
const index = Math.min(p.index, total - 1);
@ -168,7 +169,10 @@ export function QuizRunner(p: RunnerProps) {
if (elapsed > 0 && elapsed % 10 === 0) tick.current?.(elapsed);
}, [elapsed, tick]);
useEffect(() => {
if (remaining === 0 && !p.finishing) finish.current(elapsedRef.current);
if (remaining === 0 && !p.finishing && !autoSubmitted.current) {
autoSubmitted.current = true;
finish.current(elapsedRef.current);
}
}, [remaining, p.finishing, finish, elapsedRef]);
useEffect(() => {
topRef.current?.scrollIntoView({ block: 'start' });