fix(multi): use startGame for next round button in waiting phase
This commit is contained in:
@@ -23,6 +23,7 @@ type GameScreenProps = {
|
|||||||
canGoBack: boolean;
|
canGoBack: boolean;
|
||||||
onRetry: () => void;
|
onRetry: () => void;
|
||||||
onNextRound: () => void;
|
onNextRound: () => void;
|
||||||
|
onStartGame: () => void;
|
||||||
onResetGame: () => void;
|
onResetGame: () => void;
|
||||||
onSurrender: () => void;
|
onSurrender: () => void;
|
||||||
};
|
};
|
||||||
@@ -44,6 +45,7 @@ export function GameScreen({
|
|||||||
canGoBack,
|
canGoBack,
|
||||||
onRetry,
|
onRetry,
|
||||||
onNextRound,
|
onNextRound,
|
||||||
|
onStartGame,
|
||||||
onResetGame,
|
onResetGame,
|
||||||
onSurrender,
|
onSurrender,
|
||||||
}: GameScreenProps) {
|
}: GameScreenProps) {
|
||||||
@@ -201,7 +203,7 @@ export function GameScreen({
|
|||||||
</p>
|
</p>
|
||||||
{isHost && (
|
{isHost && (
|
||||||
<div className="flex flex-col gap-2.5 w-full max-w-xs mt-2">
|
<div className="flex flex-col gap-2.5 w-full max-w-xs mt-2">
|
||||||
<button className={btnPrimary} onClick={onNextRound}>
|
<button className={btnPrimary} onClick={onStartGame}>
|
||||||
Manche suivante
|
Manche suivante
|
||||||
</button>
|
</button>
|
||||||
<button className={btnGhost} onClick={onResetGame}>
|
<button className={btnGhost} onClick={onResetGame}>
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ export function ScreenRouter({
|
|||||||
canGoBack={multi.canGoBack}
|
canGoBack={multi.canGoBack}
|
||||||
onRetry={multi.retryLoad}
|
onRetry={multi.retryLoad}
|
||||||
onNextRound={handlers.handleNextRound}
|
onNextRound={handlers.handleNextRound}
|
||||||
|
onStartGame={handlers.handleStartGame}
|
||||||
onResetGame={handlers.handleResetGame}
|
onResetGame={handlers.handleResetGame}
|
||||||
onSurrender={handlers.handleSurrender}
|
onSurrender={handlers.handleSurrender}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user