Skip to content

Commit e109aa6

Browse files
fix: disable input fields on Create Invoice #1659 (#1668)
1 parent 50c5f3b commit e109aa6

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

src/app/screens/Receive/index.tsx

+32-30
Original file line numberDiff line numberDiff line change
@@ -211,40 +211,42 @@ function Receive() {
211211
}}
212212
className="h-full"
213213
>
214-
<Container justifyBetween maxWidth="sm">
215-
<div className="py-4">
216-
<div className="mb-4">
217-
<DualCurrencyField
218-
id="amount"
219-
min={0}
220-
label={t("amount.label")}
221-
placeholder={t("amount.placeholder")}
222-
fiatValue={fiatAmount}
223-
onChange={handleChange}
224-
autoFocus
225-
/>
226-
</div>
214+
<fieldset disabled={loading}>
215+
<Container justifyBetween maxWidth="sm">
216+
<div className="py-4">
217+
<div className="mb-4">
218+
<DualCurrencyField
219+
id="amount"
220+
min={0}
221+
label={t("amount.label")}
222+
placeholder={t("amount.placeholder")}
223+
fiatValue={fiatAmount}
224+
onChange={handleChange}
225+
autoFocus
226+
/>
227+
</div>
227228

229+
<div className="mb-4">
230+
<TextField
231+
id="description"
232+
label={t("description.label")}
233+
placeholder={t("description.placeholder")}
234+
onChange={handleChange}
235+
/>
236+
</div>
237+
</div>
228238
<div className="mb-4">
229-
<TextField
230-
id="description"
231-
label={t("description.label")}
232-
placeholder={t("description.placeholder")}
233-
onChange={handleChange}
239+
<Button
240+
type="submit"
241+
label={t("actions.create_invoice")}
242+
fullWidth
243+
primary
244+
loading={loading}
245+
disabled={loading}
234246
/>
235247
</div>
236-
</div>
237-
<div className="mb-4">
238-
<Button
239-
type="submit"
240-
label={t("actions.create_invoice")}
241-
fullWidth
242-
primary
243-
loading={loading}
244-
disabled={loading}
245-
/>
246-
</div>
247-
</Container>
248+
</Container>
249+
</fieldset>
248250
</form>
249251
)}
250252
</div>

0 commit comments

Comments
 (0)