Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fixed attemptCount notice phrase

Steven Tey73c58094a6dd
diff --git a/apps/web/app/(ee)/api/stripe/webhook/invoice-payment-failed.tsx b/apps/web/app/(ee)/api/stripe/webhook/invoice-payment-failed.tsx
index d35b0207ce..ad46eb07bc 100644
--- a/apps/web/app/(ee)/api/stripe/webhook/invoice-payment-failed.tsx
+++ b/apps/web/app/(ee)/api/stripe/webhook/invoice-payment-failed.tsx
@@ -61,11 +61,13 @@ export async function invoicePaymentFailed(
sendEmail({
to: user.email as string,
subject: `${
- attemptCount == 2
- ? "2nd notice: "
- : attemptCount == 3
- ? "3rd notice: "
- : ""
+ attemptCount === 1
+ ? ""
+ : attemptCount == 2
+ ? "2nd notice: "
+ : attemptCount == 3
+ ? "3rd notice: "
+ : "Final notice: "
}Your payment for Dub.co failed`,
react: (
<FailedPayment
diff --git a/packages/email/src/templates/failed-payment.tsx b/packages/email/src/templates/failed-payment.tsx
index b9edba5461..8c53cb4a70 100644
--- a/packages/email/src/templates/failed-payment.tsx
+++ b/packages/email/src/templates/failed-payment.tsx
@@ -38,7 +38,13 @@ export default function FailedPayment({
attemptCount: number;
}) {
const title = `${
- attemptCount == 2 ? "2nd notice: " : attemptCount == 3 ? "3rd notice: " : ""
+ attemptCount === 1
+ ? ""
+ : attemptCount == 2
+ ? "2nd notice: "
+ : attemptCount == 3
+ ? "3rd notice: "
+ : "Final notice: "
}Your payment for Dub failed`;
// Check if plan has partner access (Business, Advanced, Enterprise have payouts > 0)