fix combo preview

This commit is contained in:
Mashy
2019-11-23 20:24:15 +10:00
parent b9e4eca8cf
commit 8641e74f9b
3 changed files with 14 additions and 26 deletions
+4 -4
View File
@@ -169,10 +169,10 @@ class Vbox extends preact.Component {
function storeHdr() {
return (
<div class="store-hdr">
<h3
<h2
onTouchStart={e => e.target.scrollIntoView(true)}
onMouseOver={e => vboxHover(e, 'store')}> STORE
</h3>
</h2>
<div class={`bits ${vbox.bits < 3 ? 'red' : false}`} onMouseOver={e => vboxHover(e, 'bits')}>
<h1> {vbox.bits}b </h1>
</div>
@@ -214,9 +214,9 @@ class Vbox extends preact.Component {
return (
<div class='stash-hdr'>
<h3 onTouchStart={e => e.target.scrollIntoView(true)}
<h2 onTouchStart={e => e.target.scrollIntoView(true)}
onMouseOver={e => vboxHover(e, 'stash')}> STASH
</h3>
</h2>
{refundBtn}
</div>
);
+4 -4
View File
@@ -179,7 +179,8 @@ class InfoComponent extends preact.Component {
</div>
);
}
if (vboxInfo) return genItemInfo(vboxInfo);
const stateFullInfo = comboItem || vboxInfo;
if (stateFullInfo) return genItemInfo(stateFullInfo);
if (!info) return false;
if (info.includes('constructName')) {
return (
@@ -204,9 +205,8 @@ class InfoComponent extends preact.Component {
</div>
);
}
const stateFullInfo = comboItem || info;
if (!stateFullInfo) return false;
return genItemInfo(stateFullInfo);
return genItemInfo(info);
}
const Combos = () => {