From c4f95d57f25a276fb603623e75599417a64ef922 Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 22 Sep 2019 19:29:34 +1000 Subject: [PATCH] fix game btns --- client/src/components/game.ctrl.btns.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/client/src/components/game.ctrl.btns.jsx b/client/src/components/game.ctrl.btns.jsx index d92d0b86..3ca81ff3 100644 --- a/client/src/components/game.ctrl.btns.jsx +++ b/client/src/components/game.ctrl.btns.jsx @@ -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 = ; + const quitBtn = ; return (
- + {finished ? quitBtn : readyBtn}
); }