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>There are {options.unaboomersRadicalized - options.unaboomersKilled} BOOMR available to kill</p>
<img src={Explosion} alt="" width="120px" />
{options.bombBalance > 0 && (<>
<p>
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
{sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>}
@ -426,10 +427,11 @@ function Section3() {
{sendBombsWrite.isError && <>error</>}
</AwesomeButton>
</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});
sendBombsWrite.reset();
}} />
</>) || <h2>no bombs</h2>}
</div>
</div>
<NotificationContainer/>

Loading…
Cancel
Save