| 1 | import { Text } from '@react-email/components' |
| 2 | import { env } |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | InfoCard, |
| 7 | InfoRow, |
| 8 | text, |
| 9 | } from '../components/layout' |
| 10 | |
| 11 | const baseUrl = env |
| 12 | |
| 13 | interface MemberAddedToProjectEmailProps { |
| 14 | addedByName: string |
| 15 | dueDate?: string |
| 16 | memberName: string |
| 17 | organizationName: string |
| 18 | orgSlug: string |
| 19 | projectDescription?: string |
| 20 | projectName: string |
| 21 | projectSlug: string |
| 22 | } |
| 23 | |
| 24 | export default function MemberAddedToProjectEmail |
| 25 | memberName = 'Jane Smith' |
| 26 | projectName = 'Website Redesign' |
| 27 | organizationName = 'Acme Studio' |
| 28 | addedByName = 'John Doe' |
| 29 | orgSlug = 'acme' |
| 30 | projectSlug = 'website-redesign' |
| 31 | projectDescription = 'Complete overhaul of the company website with new branding.' |
| 32 | dueDate = 'April 15, 2026' |
| 33 | }: MemberAddedToProjectEmailProps) |
| 34 | return ( |
| 35 | <EmailLayout |
| 36 | heading="You've been added to a project" |
| 37 | preview={`You've been added to ${projectName |
| 38 | > |
| 39 | <Text style={ |
| 40 | Hi {memberName}, <span |
| 41 | you to <span style={text |
| 42 | {organizationName}. |
| 43 | </Text> |
| 44 | <InfoCard> |
| 45 | <InfoRow label=' |
| 46 | {dueDate && <InfoRow |
| 47 | </InfoCard> |
| 48 | {projectDescription && ( |
| 49 | <Text style={ |
| 50 | {projectDescription} |
| 51 | </Text> |
| 52 | )} |
| 53 | <ActionButton href={ |
| 54 | Open Project |
| 55 | </ActionButton> |
| 56 | </EmailLayout> |
| 57 | ) |
| 58 | } |