Skip to content

Commit

Permalink
Update InputPagar.svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
julihidalgo authored Dec 13, 2024
1 parent 4e3d354 commit 6d0f57a
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/lib/InputPagar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
async function submitForm() {
// Aquí puedes agregar la lógica para manejar el envío del formulario
console.log(`Amount: ${amount}, Recipient: ${recipient}`);
cargando=true
const seEnvio = await createPayment(amount, stellarAccount, recipient);
cargando=false
const paymentDone: PaymentDone = {
amount,
destination: recipient,
};
dispatcher('paymentDone', paymentDone);
}
let cargando=false
</script>

<div
Expand Down Expand Up @@ -88,9 +89,16 @@
recipient = '';
}}>Cancelar</button
>
<button
<button disabled={cargando}
class="px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700"
on:click={submitForm}>Enviar</button
on:click={submitForm}>
{#if cargando}
Enviando
{:else}
Enviar
{/if}

</button
>
</div>
</div>
Expand Down

0 comments on commit 6d0f57a

Please sign in to comment.