File tree 1 file changed +7
-8
lines changed
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ function Receive() {
118
118
}
119
119
}
120
120
121
+ function handleSubmit ( event : React . FormEvent < HTMLFormElement > ) {
122
+ event . preventDefault ( ) ;
123
+ createInvoice ( ) ;
124
+ }
125
+
121
126
function renderInvoice ( ) {
122
127
if ( ! invoice ) return null ;
123
128
return (
@@ -203,14 +208,8 @@ function Receive() {
203
208
{ invoice ? (
204
209
< Container maxWidth = "sm" > { renderInvoice ( ) } </ Container >
205
210
) : (
206
- < form
207
- onSubmit = { ( e : FormEvent ) => {
208
- e . preventDefault ( ) ;
209
- createInvoice ( ) ;
210
- } }
211
- className = "h-full"
212
- >
213
- < fieldset disabled = { loading } >
211
+ < form onSubmit = { handleSubmit } className = "h-full" >
212
+ < fieldset className = "h-full" disabled = { loading } >
214
213
< Container justifyBetween maxWidth = "sm" >
215
214
< div className = "py-4" >
216
215
< div className = "mb-4" >
You can’t perform that action at this time.
0 commit comments