no show bomb slider if no bomb

master
lza_menace 2 years ago
parent 07233c5d52
commit 37e7ca5d75

@ -418,6 +418,7 @@ function Section3() {
<p>Sending bombs will burn your BOMB token and kill a BOOMR token at random. Be careful not to kill yourself in the process.</p> <p>Sending bombs will burn your BOMB token and kill a BOOMR token at random. Be careful not to kill yourself in the process.</p>
<p>There are {options.unaboomersRadicalized - options.unaboomersKilled} BOOMR available to kill</p> <p>There are {options.unaboomersRadicalized - options.unaboomersKilled} BOOMR available to kill</p>
<img src={Explosion} alt="" width="120px" /> <img src={Explosion} alt="" width="120px" />
{options.bombBalance > 0 && (<>
<p> <p>
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}> <AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
{sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>} {sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>}
@ -426,10 +427,11 @@ function Section3() {
{sendBombsWrite.isError && <>error</>} {sendBombsWrite.isError && <>error</>}
</AwesomeButton> </AwesomeButton>
</p> </p>
<Slider className="slider" min={1} max={options.bombBalance || 1} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => { <Slider className="slider" min={1} max={options.bombBalance} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => {
handleStateChange({sendBombPreviewAmount: v}); handleStateChange({sendBombPreviewAmount: v});
sendBombsWrite.reset(); sendBombsWrite.reset();
}} /> }} />
</>) || <h2>no bombs</h2>}
</div> </div>
</div> </div>
<NotificationContainer/> <NotificationContainer/>

Loading…
Cancel
Save