feat(deps): adopt react-email for portal-auth template
Migrates the activation + reset email templates from hand-strung HTML strings to React components rendered via @react-email/components. Concrete wins this lands: - React auto-escapes interpolation — drops the hand-rolled escapeHtml() helper. Eliminates the entire class of "I forgot to escape" XSS bugs. - @react-email primitives (Button, Hr, Link, Text) render to Outlook/Gmail/AppleMail-safe inline-styled HTML. - JSX over template strings makes the templates editable / reviewable. - Sets the pattern for the remaining 7 templates (crm-invite, document-signing, inquiry-*, notification-digest, admin-email-change, residential-inquiry). Migrate opportunistically when those files are next touched. The shell (logo, blurred background, table-based wrapper) stays via renderShell so this is a strictly inner-body migration — visual parity preserved. Vitest config: added @vitejs/plugin-react so .tsx files imported by tests (transitively via the service that uses the template) transform correctly under Next's tsconfig `jsx: 'preserve'` setting. Verified: tsc clean, vitest 1293/1293 pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -56,11 +56,13 @@
|
||||
"@radix-ui/react-switch": "^1.2.6",
|
||||
"@radix-ui/react-tabs": "^1.1.13",
|
||||
"@radix-ui/react-tooltip": "^1.2.8",
|
||||
"@react-email/components": "^1.0.12",
|
||||
"@socket.io/redis-adapter": "^8.3.0",
|
||||
"@tanstack/query-broadcast-client-experimental": "^5.100.10",
|
||||
"@tanstack/react-query": "^5.100.10",
|
||||
"@tanstack/react-query-devtools": "^5.100.10",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"@tanstack/react-virtual": "^3.13.24",
|
||||
"@types/pdfkit": "^0.17.6",
|
||||
"archiver": "^7.0.1",
|
||||
"better-auth": "^1.6.10",
|
||||
@@ -92,6 +94,7 @@
|
||||
"react-day-picker": "^10.0.0",
|
||||
"react-dom": "^19.2.6",
|
||||
"react-easy-crop": "^5.5.7",
|
||||
"react-email": "^6.1.3",
|
||||
"react-hook-form": "^7.75.0",
|
||||
"recharts": "^3.8.1",
|
||||
"sharp": "^0.34.5",
|
||||
@@ -120,6 +123,7 @@
|
||||
"@types/nodemailer": "^8.0.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"@vitest/coverage-v8": "^4.1.6",
|
||||
"autoprefixer": "^10.5.0",
|
||||
"dotenv": "^17.4.2",
|
||||
|
||||
Reference in New Issue
Block a user