Stay on reason screen

This commit is contained in:
Joey Yakimowich-Payne 2026-01-13 17:10:54 -07:00
commit 3e7b89bcad
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
3 changed files with 28 additions and 8 deletions

View file

@ -241,7 +241,11 @@ export const useGame = () => {
if (timerRef.current) clearInterval(timerRef.current);
setGameState('REVEAL');
broadcast({ type: 'TIME_UP', payload: {} });
setTimeout(() => setGameState('SCOREBOARD'), 4000);
};
const showScoreboard = () => {
setGameState('SCOREBOARD');
broadcast({ type: 'SHOW_SCOREBOARD', payload: { players: playersRef.current } });
};
const nextQuestion = () => {
@ -391,6 +395,6 @@ export const useGame = () => {
return {
role, gameState, quiz, players, currentQuestionIndex, timeLeft, error, gamePin, hasAnswered, lastPointsEarned, currentCorrectShape, selectedOption, currentPlayerScore, currentStreak, currentPlayerId,
pendingQuizToSave, dismissSavePrompt,
startQuizGen, startManualCreation, finalizeManualQuiz, loadSavedQuiz, joinGame, startGame: startHostGame, handleAnswer, nextQuestion
startQuizGen, startManualCreation, finalizeManualQuiz, loadSavedQuiz, joinGame, startGame: startHostGame, handleAnswer, nextQuestion, showScoreboard
};
};