feat(email): adota React Email em notificações e automações
This commit is contained in:
parent
58a1ed6b36
commit
4306b0504d
18 changed files with 940 additions and 337 deletions
15
convex/reactEmail.tsx
Normal file
15
convex/reactEmail.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import * as React from "react"
|
||||
import { render } from "@react-email/render"
|
||||
|
||||
import AutomationEmail, { type AutomationEmailProps } from "../emails/automation-email"
|
||||
import SimpleNotificationEmail, { type SimpleNotificationEmailProps } from "../emails/simple-notification-email"
|
||||
|
||||
export type { AutomationEmailProps, SimpleNotificationEmailProps }
|
||||
|
||||
export async function renderAutomationEmailHtml(props: AutomationEmailProps) {
|
||||
return render(<AutomationEmail {...props} />, { pretty: false })
|
||||
}
|
||||
|
||||
export async function renderSimpleNotificationEmailHtml(props: SimpleNotificationEmailProps) {
|
||||
return render(<SimpleNotificationEmail {...props} />, { pretty: false })
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue