feat(email): adota React Email em notificações e automações

This commit is contained in:
esdrasrenan 2025-12-13 13:11:41 -03:00
parent 58a1ed6b36
commit 4306b0504d
18 changed files with 940 additions and 337 deletions

15
convex/reactEmail.tsx Normal file
View 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 })
}