Skip to content

Commit

Permalink
feat: Disable 'Create Invoice' button until an amount is entered
Browse files Browse the repository at this point in the history
Fixes : getAlby#2802

The button is now disabled until the user enters a value in the 'Amount' field. This ensures that the user cannot create an invoice without specifying the amount first.

This change helps to prevent invalid or incomplete invoice creation.
  • Loading branch information
AdarshRawat1 committed Oct 29, 2023
1 parent 9d9d0b0 commit cbad631
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/screens/ReceiveInvoice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ function ReceiveInvoice() {
fullWidth
primary
loading={loadingInvoice}
disabled={loadingInvoice}
disabled={
loadingInvoice ||
!formData.amount ||
formData.amount === "0"
}
/>
</Container>
</fieldset>
Expand Down

0 comments on commit cbad631

Please sign in to comment.