fix(multi): hide next round button when all rounds are completed
This commit is contained in:
@@ -94,10 +94,18 @@ export function GameScreen({
|
|||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="text-center text-xs text-[#555]">
|
||||||
|
Manche {room.round}/{room.totalRounds}
|
||||||
|
</div>
|
||||||
{isHost ? (
|
{isHost ? (
|
||||||
<div className="flex flex-col gap-2.5">
|
<div className="flex flex-col gap-2.5">
|
||||||
<button className={btnPrimary} onClick={onNextRound}>Manche suivante</button>
|
{room.round < room.totalRounds
|
||||||
<button className={btnGhost} onClick={onResetGame}>Nouvelle partie</button>
|
? <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>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<p className="text-xs sm:text-sm text-[#888] text-center animate-pulse-slow">En attente de l'hôte...</p>
|
<p className="text-xs sm:text-sm text-[#888] text-center animate-pulse-slow">En attente de l'hôte...</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user