no show bomb slider if no bomb

master
lza_menace 2 years ago
parent 07233c5d52
commit 37e7ca5d75

@ -418,18 +418,20 @@ 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" />
<p> {options.bombBalance > 0 && (<>
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}> <p>
{sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>} <AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
{sendBombsWrite.isIdle && <>send {options.sendBombPreviewAmount} (~0 Ξ)</>} {sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>}
{sendBombsWrite.isSuccess && <>sent</>} {sendBombsWrite.isIdle && <>send {options.sendBombPreviewAmount} (~0 Ξ)</>}
{sendBombsWrite.isError && <>error</>} {sendBombsWrite.isSuccess && <>sent</>}
</AwesomeButton> {sendBombsWrite.isError && <>error</>}
</p> </AwesomeButton>
<Slider className="slider" min={1} max={options.bombBalance || 1} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => { </p>
handleStateChange({sendBombPreviewAmount: v}); <Slider className="slider" min={1} max={options.bombBalance} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => {
sendBombsWrite.reset(); handleStateChange({sendBombPreviewAmount: v});
}} /> sendBombsWrite.reset();
}} />
</>) || <h2>no bombs</h2>}
</div> </div>
</div> </div>
<NotificationContainer/> <NotificationContainer/>

Loading…
Cancel
Save