fix game btns
This commit is contained in:
parent
1bb741f885
commit
c4f95d57f2
@ -54,17 +54,28 @@ function GameCtrlBtns(args) {
|
||||
game,
|
||||
animating,
|
||||
|
||||
getInstanceState,
|
||||
sendGameSkillClear,
|
||||
sendReady,
|
||||
quit,
|
||||
} = args;
|
||||
|
||||
if (!game) return false;
|
||||
const finished = game.phase === 'Finish';
|
||||
|
||||
function quitClick() {
|
||||
getInstanceState();
|
||||
quit();
|
||||
}
|
||||
|
||||
const readyBtn = <button disabled={animating} class="ready" onClick={() => sendReady()}>Ready</button>;
|
||||
const quitBtn = <button disabled={animating} onClick={quitClick}>Back</button>;
|
||||
|
||||
return (
|
||||
<div class="game-ctrl-btns">
|
||||
<button disabled={true} >Chat</button>
|
||||
<button disabled={animating} onClick={sendGameSkillClear}>Clear</button>
|
||||
<button disabled={animating} class="ready" onClick={() => sendReady()}>Ready</button>
|
||||
{finished ? quitBtn : readyBtn}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user