Update balance message if funds are sufficient
This commit is contained in:
parent
462bb97cb0
commit
10569f0ece
@ -432,6 +432,12 @@ const Configure = () => {
|
|||||||
fetchDeployers();
|
fetchDeployers();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if(isBalanceSufficient) {
|
||||||
|
setBalanceMessage(undefined);
|
||||||
|
}
|
||||||
|
}, [isBalanceSufficient]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-7 px-4 py-6">
|
<div className="space-y-7 px-4 py-6">
|
||||||
<div className="flex justify-between mb-6">
|
<div className="flex justify-between mb-6">
|
||||||
@ -626,15 +632,13 @@ const Configure = () => {
|
|||||||
<Button
|
<Button
|
||||||
{...buttonSize}
|
{...buttonSize}
|
||||||
shape="default"
|
shape="default"
|
||||||
onClick={() => setBalanceMessage('Waiting for payment')}
|
onClick={(e: any) => {
|
||||||
|
e.preventDefault();
|
||||||
|
setBalanceMessage('Waiting for payment');
|
||||||
|
window.open('https://store.laconic.com', '_blank', 'noopener,noreferrer');
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<a
|
Buy prepaid service
|
||||||
href="https://store.laconic.com"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
Buy prepaid service
|
|
||||||
</a>
|
|
||||||
</Button>
|
</Button>
|
||||||
<p className="text-gray-700 dark:text-gray-300">
|
<p className="text-gray-700 dark:text-gray-300">
|
||||||
{balanceMessage !== undefined ? (
|
{balanceMessage !== undefined ? (
|
||||||
@ -661,7 +665,7 @@ const Configure = () => {
|
|||||||
setIsDataReceived={setIsAccountsDataReceived}
|
setIsDataReceived={setIsAccountsDataReceived}
|
||||||
isVisible={isFrameVisible}
|
isVisible={isFrameVisible}
|
||||||
/>
|
/>
|
||||||
<CheckBalanceIframe onBalanceChange={setIsBalanceSufficient} amount={amountToBePaid} isPollingEnabled={true}/>
|
<CheckBalanceIframe onBalanceChange={setIsBalanceSufficient} amount={amountToBePaid} isPollingEnabled={true} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user