-
Notifications
You must be signed in to change notification settings - Fork 324
/
teamInviteEmailCreator.tsx
35 lines (28 loc) · 1.02 KB
/
teamInviteEmailCreator.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import Oy from 'oy-vey'
import TeamInvite, {TeamInviteProps} from 'parabol-client/modules/email/components/TeamInvite'
import {headCSS} from 'parabol-client/modules/email/styles'
import React from 'react'
const subjectLine = (inviterName: string): string => `${inviterName} has invited you to Parabol`
const teamInviteText = (props: TeamInviteProps) => {
const {inviteeName, inviteeEmail, inviterName, inviterEmail, inviteLink, teamName} = props
return `
Hello ${inviteeName || inviteeEmail},
${inviterName} (${inviterEmail}) has invited you to join a team on Parabol: ${teamName}
Parabol is software for remote teams to run online retrospective and check-in meetings.
Get started here: ${inviteLink}
Your friends,
The Parabol Product Team
`
}
export default (props: TeamInviteProps) => {
const subject = subjectLine(props.inviterName)
return {
subject,
body: teamInviteText(props),
html: Oy.renderTemplate(<TeamInvite {...props} />, {
headCSS,
title: subject,
previewText: subject
})
}
}