From b76fbf8789225d94766e560467d23dcac24b84b3 Mon Sep 17 00:00:00 2001 From: jessy-david-dev Date: Sat, 11 Apr 2026 22:19:25 +0200 Subject: [PATCH] fix(multi): stay on game screen between rounds instead of redirecting to lobby --- app/components/GameScreen.tsx | 18 ++++++++++++++++++ lib/useGameHandlers.ts | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/components/GameScreen.tsx b/app/components/GameScreen.tsx index 51a5437..66fdd6d 100644 --- a/app/components/GameScreen.tsx +++ b/app/components/GameScreen.tsx @@ -114,6 +114,24 @@ export function GameScreen({ ); + // Entre les manches : attente que l'hôte démarre la suivante + if (room.phase === "waiting") return ( +
+
+
Manche {room.round}/{room.totalRounds} terminée
+

+ {isHost ? "Lance la manche suivante quand tu veux." : "En attente que l'hôte démarre la prochaine manche..."} +

+ {isHost && ( +
+ + +
+ )} +
+
+ ); + // Countdown if (room.phase === "countdown") return (
diff --git a/lib/useGameHandlers.ts b/lib/useGameHandlers.ts index 6a0b34d..a4c4800 100644 --- a/lib/useGameHandlers.ts +++ b/lib/useGameHandlers.ts @@ -50,12 +50,12 @@ export function useGameHandlers({ async function handleNextRound() { await multi.nextRound(); - setScreen("lobby"); + // On reste sur "game" — le GameScreen affiche le lobby quand phase === "waiting" } async function handleResetGame() { await multi.resetGame(); - setScreen("lobby"); + // On reste sur "game" — le GameScreen affiche le lobby quand phase === "waiting" } function handleLeave() {