misc
This commit is contained in:
parent
a38c603ec9
commit
7f6df40ea7
@ -15,9 +15,8 @@ const addState = connect(
|
||||
} = state;
|
||||
|
||||
function sendReady() {
|
||||
document.activeElement.blur()
|
||||
document.activeElement.blur();
|
||||
return ws.sendInstanceReady(instance.id);
|
||||
return false;
|
||||
}
|
||||
|
||||
function sendAbandon() {
|
||||
@ -87,14 +86,14 @@ function Controls(args) {
|
||||
? <button class="ready" onClick={() => sendReady()}>Ready</button>
|
||||
: <button class="ready" onClick={leave}>Leave</button>
|
||||
|
||||
|
||||
const abandon = instance.phase !== 'Finished' ? sendAbandon : false;
|
||||
return (
|
||||
<aside>
|
||||
{timer}
|
||||
<div class="controls">
|
||||
<PlayerBox player={opponent} />
|
||||
{ready}
|
||||
<PlayerBox player={player} isPlayer={true} abandon={sendAbandon}/>
|
||||
<PlayerBox player={player} isPlayer={true} abandon={abandon}/>
|
||||
</div>
|
||||
</aside>
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user