Skip to content

Commit b4c2294

Browse files
authored
improvement(emails): update unsub page, standardize unsub process (#2881)
1 parent 1dbf92d commit b4c2294

23 files changed

+240
-306
lines changed

apps/sim/app/unsubscribe/unsubscribe.tsx

Lines changed: 157 additions & 249 deletions
Large diffs are not rendered by default.

apps/sim/components/emails/auth/otp-verification-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function OTPVerificationEmail({
3434
const brand = getBrandConfig()
3535

3636
return (
37-
<EmailLayout preview={getSubjectByType(type, brand.name, chatTitle)}>
37+
<EmailLayout preview={getSubjectByType(type, brand.name, chatTitle)} showUnsubscribe={false}>
3838
<Text style={baseStyles.paragraph}>Your verification code:</Text>
3939

4040
<Section style={baseStyles.codeContainer}>

apps/sim/components/emails/auth/reset-password-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function ResetPasswordEmail({ username = '', resetLink = '' }: ResetPassw
1212
const brand = getBrandConfig()
1313

1414
return (
15-
<EmailLayout preview={`Reset your ${brand.name} password`}>
15+
<EmailLayout preview={`Reset your ${brand.name} password`} showUnsubscribe={false}>
1616
<Text style={baseStyles.paragraph}>Hello {username},</Text>
1717
<Text style={baseStyles.paragraph}>
1818
A password reset was requested for your {brand.name} account. Click below to set a new

apps/sim/components/emails/auth/welcome-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function WelcomeEmail({ userName }: WelcomeEmailProps) {
1313
const baseUrl = getBaseUrl()
1414

1515
return (
16-
<EmailLayout preview={`Welcome to ${brand.name}`}>
16+
<EmailLayout preview={`Welcome to ${brand.name}`} showUnsubscribe={false}>
1717
<Text style={{ ...baseStyles.paragraph, marginTop: 0 }}>
1818
{userName ? `Hey ${userName},` : 'Hey,'}
1919
</Text>

apps/sim/components/emails/billing/credit-purchase-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function CreditPurchaseEmail({
2323
const previewText = `${brand.name}: $${amount.toFixed(2)} in credits added to your account`
2424

2525
return (
26-
<EmailLayout preview={previewText}>
26+
<EmailLayout preview={previewText} showUnsubscribe={false}>
2727
<Text style={{ ...baseStyles.paragraph, marginTop: 0 }}>
2828
{userName ? `Hi ${userName},` : 'Hi,'}
2929
</Text>

apps/sim/components/emails/billing/enterprise-subscription-email.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ export function EnterpriseSubscriptionEmail({
1818
const effectiveLoginLink = loginLink || `${baseUrl}/login`
1919

2020
return (
21-
<EmailLayout preview={`Your Enterprise Plan is now active on ${brand.name}`}>
21+
<EmailLayout
22+
preview={`Your Enterprise Plan is now active on ${brand.name}`}
23+
showUnsubscribe={false}
24+
>
2225
<Text style={baseStyles.paragraph}>Hello {userName},</Text>
2326
<Text style={baseStyles.paragraph}>
2427
Your <strong>Enterprise Plan</strong> is now active. You have full access to advanced

apps/sim/components/emails/billing/free-tier-upgrade-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function FreeTierUpgradeEmail({
3131
const previewText = `${brand.name}: You've used ${percentUsed}% of your free credits`
3232

3333
return (
34-
<EmailLayout preview={previewText}>
34+
<EmailLayout preview={previewText} showUnsubscribe={true}>
3535
<Text style={{ ...baseStyles.paragraph, marginTop: 0 }}>
3636
{userName ? `Hi ${userName},` : 'Hi,'}
3737
</Text>

apps/sim/components/emails/billing/payment-failed-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function PaymentFailedEmail({
2525
const previewText = `${brand.name}: Payment Failed - Action Required`
2626

2727
return (
28-
<EmailLayout preview={previewText}>
28+
<EmailLayout preview={previewText} showUnsubscribe={false}>
2929
<Text style={{ ...baseStyles.paragraph, marginTop: 0 }}>
3030
{userName ? `Hi ${userName},` : 'Hi,'}
3131
</Text>

apps/sim/components/emails/billing/plan-welcome-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function PlanWelcomeEmail({ planName, userName, loginLink }: PlanWelcomeE
1818
const previewText = `${brand.name}: Your ${planName} plan is active`
1919

2020
return (
21-
<EmailLayout preview={previewText}>
21+
<EmailLayout preview={previewText} showUnsubscribe={true}>
2222
<Text style={{ ...baseStyles.paragraph, marginTop: 0 }}>
2323
{userName ? `Hi ${userName},` : 'Hi,'}
2424
</Text>

apps/sim/components/emails/billing/usage-threshold-email.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export function UsageThresholdEmail({
2525
const previewText = `${brand.name}: You're at ${percentUsed}% of your ${planName} monthly budget`
2626

2727
return (
28-
<EmailLayout preview={previewText}>
28+
<EmailLayout preview={previewText} showUnsubscribe={true}>
2929
<Text style={{ ...baseStyles.paragraph, marginTop: 0 }}>
3030
{userName ? `Hi ${userName},` : 'Hi,'}
3131
</Text>

0 commit comments

Comments
 (0)