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>There are {options.unaboomersRadicalized - options.unaboomersKilled} BOOMR available to kill</p>
<img src={Explosion} alt="" width="120px" />
<p>
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
{sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>}
{sendBombsWrite.isIdle && <>send {options.sendBombPreviewAmount} (~0 Ξ)</>}
{sendBombsWrite.isSuccess && <>sent</>}
{sendBombsWrite.isError && <>error</>}
</AwesomeButton>
</p>
<Slider className="slider" min={1} max={options.bombBalance || 1} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => {
handleStateChange({sendBombPreviewAmount: v});
sendBombsWrite.reset();
}} />
{options.bombBalance > 0 && (<>
<p>
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
{sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>}
{sendBombsWrite.isIdle && <>send {options.sendBombPreviewAmount} (~0 Ξ)</>}
{sendBombsWrite.isSuccess && <>sent</>}
{sendBombsWrite.isError && <>error</>}
</AwesomeButton>
</p>
<Slider className="slider" min={1} max={options.bombBalance} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => {
handleStateChange({sendBombPreviewAmount: v});
sendBombsWrite.reset();
}} />
</>) || <h2>no bombs</h2>}
</div>
</div>
<NotificationContainer/>

Loading…
Cancel
Save