Add disable timer setting and fix per-question time limits

Add a 'Question Timer' toggle to game settings that lets the host disable
the countdown timer. When disabled, questions show ∞ instead of a countdown,
the host gets an 'End Question' button to manually advance, and all correct
answers receive maximum points.

Also fix a bug where per-question time limits were ignored — the timer and
scoring always used the hardcoded 20-second default instead of each question's
individual timeLimit.
This commit is contained in:
Joey Yakimowich-Payne 2026-02-23 13:44:12 -07:00
commit d1f82440a1
No known key found for this signature in database
GPG key ID: DDF6AF5B21B407D4
9 changed files with 94 additions and 31 deletions

View file

@ -106,7 +106,8 @@ function App() {
kickPlayer,
leaveGame,
connectedPlayerIds,
setHostName
setHostName,
endQuestion,
} = useGame(defaultConfig);
const handleSaveQuiz = async () => {
@ -275,6 +276,8 @@ function App() {
hasAnswered={hasAnswered}
lastPointsEarned={lastPointsEarned}
hostPlays={gameConfig.hostParticipates}
timerEnabled={gameConfig.timerEnabled}
onEndQuestion={role === 'HOST' ? endQuestion : undefined}
/>
) : role === 'CLIENT' && hasAnswered ? (
<div className="flex flex-col items-center justify-center h-screen">