File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 32
32
async function submitForm() {
33
33
// Aquí puedes agregar la lógica para manejar el envío del formulario
34
34
console .log (` Amount: ${amount }, Recipient: ${recipient } ` );
35
-
35
+ cargando = true
36
36
const seEnvio = await createPayment (amount , stellarAccount , recipient );
37
-
37
+ cargando = false
38
38
const paymentDone: PaymentDone = {
39
39
amount ,
40
40
destination: recipient ,
41
41
};
42
42
dispatcher (' paymentDone' , paymentDone );
43
43
}
44
+ let cargando= false
44
45
</script >
45
46
46
47
<div
88
89
recipient = ' ' ;
89
90
}}>Cancelar</button
90
91
>
91
- <button
92
+ <button disabled ={ cargando }
92
93
class =" px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700"
93
- on:click ={submitForm }>Enviar</button
94
+ on:click ={submitForm }>
95
+ {#if cargando }
96
+ Enviando
97
+ {:else }
98
+ Enviar
99
+ {/if }
100
+
101
+ </button
94
102
>
95
103
</div >
96
104
</div >
You can’t perform that action at this time.
0 commit comments