Skip to content

Commit d7cec4c

Browse files
Update payment UI for failed payments
- Change pay button text from 'Pay now' to 'Pay again' for failed payments - Update success message from 'Payment sent!' to 'Payment initiated' - Maintain conditional logic based on invoice.status === 'failed' Co-Authored-By: sahil.lavingia@gmail.com <sahil.lavingia@gmail.com>
1 parent 8582efb commit d7cec4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/app/invoices/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ export const ApproveButton = ({ invoice, onApprove }: { invoice: Invoice; onAppr
149149
<MutationButton
150150
mutation={approveInvoices}
151151
param={{ [pay ? "pay_ids" : "approve_ids"]: [invoice.id] }}
152-
successText={pay ? "Payment sent!" : "Approved!"}
152+
successText={pay ? "Payment initiated" : "Approved!"}
153153
loadingText={pay ? "Sending payment..." : "Approving..."}
154154
disabled={!!pay && (!company.completedPaymentMethodSetup || !taxRequirementsMet(invoice))}
155155
>
156156
{pay ? (
157157
<>
158-
<CurrencyDollarIcon className="size-4" /> Pay now
158+
<CurrencyDollarIcon className="size-4" /> {invoice.status === "failed" ? "Pay again" : "Pay now"}
159159
</>
160160
) : (
161161
"Approve"

0 commit comments

Comments
 (0)