Skip to content

Commit

Permalink
fix: type error in invite email (#9606)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch committed Apr 8, 2024
1 parent cd5a3a8 commit 6ead321
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions packages/server/email/teamInviteEmailCreator.tsx
Expand Up @@ -3,7 +3,7 @@ import TeamInvite, {TeamInviteProps} from 'parabol-client/modules/email/componen
import {headCSS} from 'parabol-client/modules/email/styles'
import React from 'react'

const subject = (inviterName: string) : string => `${inviterName} has invited you to Parabol`
const subjectLine = (inviterName: string): string => `${inviterName} has invited you to Parabol`

const teamInviteText = (props: TeamInviteProps) => {
const {inviteeName, inviteeEmail, inviterName, inviterEmail, inviteLink, teamName} = props
Expand All @@ -21,12 +21,15 @@ The Parabol Product Team
`
}

export default (props: TeamInviteProps) => ({
subject: subject(props.inviterName),
body: teamInviteText(props),
html: Oy.renderTemplate(<TeamInvite {...props} />, {
headCSS,
title: subject,
previewText: subject
})
})
export default (props: TeamInviteProps) => {
const subject = subjectLine(props.inviterName)
return {
subject,
body: teamInviteText(props),
html: Oy.renderTemplate(<TeamInvite {...props} />, {
headCSS,
title: subject,
previewText: subject
})
}
}

0 comments on commit 6ead321

Please sign in to comment.