Skip to content

Commit 0f82b68

Browse files
committed
fix: align confirmOrCancel with bottom and align form-submit handling #1902
1 parent d071c19 commit 0f82b68

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/app/screens/Receive/index.tsx

+7-8
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ function Receive() {
118118
}
119119
}
120120

121+
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
122+
event.preventDefault();
123+
createInvoice();
124+
}
125+
121126
function renderInvoice() {
122127
if (!invoice) return null;
123128
return (
@@ -203,14 +208,8 @@ function Receive() {
203208
{invoice ? (
204209
<Container maxWidth="sm">{renderInvoice()}</Container>
205210
) : (
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}>
214213
<Container justifyBetween maxWidth="sm">
215214
<div className="py-4">
216215
<div className="mb-4">

0 commit comments

Comments
 (0)