disable offer during animation, don't set instance to null

This commit is contained in:
Mashy 2019-10-28 13:50:05 +10:00
parent 58678e958e
commit 6da01f879d
2 changed files with 1 additions and 2 deletions

View File

@ -46,7 +46,6 @@ const addState = connect(
function quit() { function quit() {
dispatch(actions.setNav('transition')); dispatch(actions.setNav('transition'));
dispatch(actions.setGame(null)); dispatch(actions.setGame(null));
dispatch(actions.setInstance(null));
} }
function setChatShow(v) { function setChatShow(v) {

View File

@ -81,7 +81,7 @@ function GameCtrlTopBtns(args) {
? 'Offered' ? 'Offered'
: drawState ? 'Draw' : 'Offer'; : drawState ? 'Draw' : 'Offer';
const drawAction = drawState ? sendDraw : drawStateTrue; const drawAction = drawState ? sendDraw : drawStateTrue;
const drawBtn = <button class={drawClasses} disabled={finished || drawOffered} onClick={drawAction}>{drawText}</button>; const drawBtn = <button class={drawClasses} disabled={finished || animating || drawOffered} onClick={drawAction}>{drawText}</button>;
return ( return (
<div class="instance-ctrl-btns"> <div class="instance-ctrl-btns">