Skip to content

Commit

Permalink
ui: hide cancel button on successful renewal
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Jan 21, 2024
1 parent a5d821b commit 6d030dc
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/fb/SpendFidelityBondModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { CopyButton } from '../CopyButton'
import { LockInfoAlert } from './CreateFidelityBond'
import { useWaitForUtxosToBeSpent } from '../../hooks/WaitForUtxosToBeSpent'
import styles from './SpendFidelityBondModal.module.css'
import classNames from 'classnames'

type Input = {
outpoint: Api.UtxoId
Expand Down Expand Up @@ -484,14 +485,16 @@ const RenewFidelityBondModal = ({
</rb.Modal.Body>
<rb.Modal.Footer>
<div className="w-100 d-flex gap-4 justify-content-center align-items-center">
<rb.Button
variant="light"
disabled={isLoading}
onClick={() => onClose({ txInfo, mustReload: parentMustReload })}
className="flex-1 d-flex justify-content-center align-items-center"
>
{t('global.cancel')}
</rb.Button>
{!txInfo && (
<rb.Button
variant="light"
disabled={isLoading}
onClick={() => onClose({ txInfo, mustReload: parentMustReload })}
className="flex-1 d-flex justify-content-center align-items-center"
>
{t('global.cancel')}
</rb.Button>
)}
<rb.Button
ref={submitButtonRef}
variant="dark"
Expand All @@ -506,6 +509,7 @@ const RenewFidelityBondModal = ({
</rb.Modal>
{lockDate && fidelityBond && timelockedAddress !== undefined && (
<PaymentConfirmModal
size="lg"
isShown={showConfirmSendModal}
title={t('earn.fidelity_bond.renew.confirm_send_modal.title')}
onCancel={() => {
Expand Down

0 comments on commit 6d030dc

Please sign in to comment.