This commit is contained in:
ntr 2019-09-13 14:57:57 +10:00
parent a878992358
commit 61dbadb51f
2 changed files with 6 additions and 4 deletions

View File

@ -106,9 +106,11 @@ aside {
padding: 0 0.75em 0 0.75em;
}
.abandon:not([disabled]) {
font-size: 80%;
.instance-ctrl-btns {
font-size: 50%;
}
.abandon:not([disabled]) {
&:hover {
color: @red;
border-color: @red;

View File

@ -46,7 +46,7 @@ function InstanceCtrlBtns(args) {
instance,
} = args;
const finished = instance.phase === 'Finished';
const finished = instance && instance.phase === 'Finished';
const { abandonState } = this.state;
@ -65,7 +65,7 @@ function InstanceCtrlBtns(args) {
const abandonAction = abandonState ? sendAbandon : abandonStateTrue;
return (
<div>
<div class="instance-ctrl-btns">
{game ? <button disabled={animating} onClick={sendGameSkillClear}>Clear</button> : null}
<button class={abandonClasses} disabled={animating || finished} onClick={abandonAction}>Abandon</button>
</div>