fix(multi): hide next round button when all rounds are completed

This commit is contained in:
jessy-david-dev
2026-04-11 22:10:04 +02:00
parent c3152058ce
commit 6be8db9145
+10 -2
View File
@@ -94,10 +94,18 @@ export function GameScreen({
))}
</ul>
</div>
<div className="text-center text-xs text-[#555]">
Manche {room.round}/{room.totalRounds}
</div>
{isHost ? (
<div className="flex flex-col gap-2.5">
<button className={btnPrimary} onClick={onNextRound}>Manche suivante</button>
<button className={btnGhost} onClick={onResetGame}>Nouvelle partie</button>
{room.round < room.totalRounds
? <button className={btnPrimary} onClick={onNextRound}>Manche suivante</button>
: <button className={btnPrimary} onClick={onResetGame}>Partie terminée Recommencer</button>
}
{room.round < room.totalRounds && (
<button className={btnGhost} onClick={onResetGame}>Arrêter la partie</button>
)}
</div>
) : (
<p className="text-xs sm:text-sm text-[#888] text-center animate-pulse-slow">En attente de l&apos;hôte...</p>