Update UI to display button for getting funds

This commit is contained in:
IshaVenikar 2025-02-10 16:52:29 +05:30
parent f0639e0ac0
commit d4ffe28f8a

View File

@ -617,56 +617,54 @@ const Configure = () => {
</Button>
</div>
) : (
<>
<div className="flex gap-4">
{selectedAccount && (
<Button
{...buttonSize}
type="submit"
shape="default"
disabled={
isLoading || isPaymentLoading || !selectedAccount || !isBalanceSufficient
}
rightIcon={
isLoading || isPaymentLoading ? (
<LoadingIcon className="animate-spin" />
) : (
<ArrowRightCircleFilledIcon />
)
}
>
{!isPaymentDone
? isPaymentLoading
? 'Transaction Requested'
: 'Pay and Deploy'
: isLoading
? 'Deploying'
: 'Deploy'}
</Button>
)}
{isAccountsDataReceived && isBalanceSufficient !== undefined ? (
(!selectedAccount || !isBalanceSufficient) ? (
<div className="p-6 bg-slate-100 dark:bg-overlay3 rounded-lg mb-6 shadow-md">
<div className="text-center">
<p className="text-gray-700 dark:text-gray-300 mb-4">
{!selectedAccount ? 'No accounts found.' : 'Insufficient funds.'}
{' '}Please visit{' '}
<a
href="https://store.laconic.com"
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 underline dark:text-blue-400"
>
store.laconic.com
</a>{' '}
to create a wallet.
</p>
</div>
<div className="flex items-center gap-4">
<Button {...buttonSize} shape="default">
<a
href="https://store.laconic.com"
target="_blank"
rel="noopener noreferrer"
>
Buy prepaid service
</a>
</Button>
<p className="text-gray-700 dark:text-gray-300">
{!selectedAccount ? 'No accounts found. Create a wallet.' : 'Insufficient funds.'}
</p>
</div>
) : null
) : null}
{selectedAccount && (
<div>
<Button
{...buttonSize}
type="submit"
shape="default"
disabled={
isLoading || isPaymentLoading || !selectedAccount || !isBalanceSufficient
}
rightIcon={
isLoading || isPaymentLoading ? (
<LoadingIcon className="animate-spin" />
) : (
<ArrowRightCircleFilledIcon />
)
}
>
{!isPaymentDone
? isPaymentLoading
? 'Transaction Requested'
: 'Pay and Deploy'
: isLoading
? 'Deploying'
: 'Deploy'}
</Button>
</div>
)}
</>
</div>
)}
</form>
</FormProvider>