mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
* feat(email): welcome email; improvement(emails): ui/ux * improvement(emails): links, accounts, preview * refactor(emails): file structure and wrapper components * added envvar for personal emails sent, added isHosted gate * fixed failing tests, added env mock * fix: removed comment --------- Co-authored-by: waleed <walif6@gmail.com>
52 lines
1.7 KiB
TypeScript
52 lines
1.7 KiB
TypeScript
import { Link, Text } from '@react-email/components'
|
|
import { baseStyles } from '@/components/emails/_styles'
|
|
import { EmailLayout } from '@/components/emails/components'
|
|
import { getBrandConfig } from '@/lib/branding/branding'
|
|
import { getBaseUrl } from '@/lib/core/utils/urls'
|
|
|
|
interface EnterpriseSubscriptionEmailProps {
|
|
userName?: string
|
|
loginLink?: string
|
|
}
|
|
|
|
export function EnterpriseSubscriptionEmail({
|
|
userName = 'Valued User',
|
|
loginLink,
|
|
}: EnterpriseSubscriptionEmailProps) {
|
|
const brand = getBrandConfig()
|
|
const baseUrl = getBaseUrl()
|
|
const effectiveLoginLink = loginLink || `${baseUrl}/login`
|
|
|
|
return (
|
|
<EmailLayout preview={`Your Enterprise Plan is now active on ${brand.name}`}>
|
|
<Text style={baseStyles.paragraph}>Hello {userName},</Text>
|
|
<Text style={baseStyles.paragraph}>
|
|
Your <strong>Enterprise Plan</strong> is now active. You have full access to advanced
|
|
features and increased capacity for your workflows.
|
|
</Text>
|
|
|
|
<Link href={effectiveLoginLink} style={{ textDecoration: 'none' }}>
|
|
<Text style={baseStyles.button}>Open {brand.name}</Text>
|
|
</Link>
|
|
|
|
<Text style={baseStyles.paragraph}>
|
|
<strong>Next steps:</strong>
|
|
<br />• Invite team members to your organization
|
|
<br />• Start building your workflows
|
|
</Text>
|
|
|
|
{/* Divider */}
|
|
<div style={baseStyles.divider} />
|
|
|
|
<Text style={{ ...baseStyles.footerText, textAlign: 'left' }}>
|
|
Questions? Reply to this email or contact us at{' '}
|
|
<Link href={`mailto:${brand.supportEmail}`} style={baseStyles.link}>
|
|
{brand.supportEmail}
|
|
</Link>
|
|
</Text>
|
|
</EmailLayout>
|
|
)
|
|
}
|
|
|
|
export default EnterpriseSubscriptionEmail
|