Name: ${data.name}
Email: ${data.email}
Phone: ${data.phone}
Message:
${data.message.replace(/\n/g, '
')}
"{TESTIMONIALS[active].quote}"
— {TESTIMONIALS[active].name}
Thanks! Teressa will be in touch soon.
} return ( ) } ``` ### Anti-Patterns to Avoid - **Using `useFormState` from `react-dom`:** Removed in React 19. Use `useActionState` from `react` instead. - **Storing contact form submissions in DB in this phase:** CONTEXT.md locked to email-only delivery. DB storage is out of scope. - **Importing carousel library (Swiper, Embla):** Adds unnecessary bundle for 4-5 static testimonials. Hand-roll with useState/useEffect. - **Putting a link to `/agent/login` on the public site:** Explicitly locked out of scope — agent navigates there directly via URL. - **Hardcoding SMTP credentials:** Always read from `CONTACT_EMAIL_USER` / `CONTACT_EMAIL_PASS` env vars. - **Using `router.push` for smooth scroll:** Use CSS `scroll-behavior: smooth` + `` anchors instead. --- ## Don't Hand-Roll | Problem | Don't Build | Use Instead | Why | |---------|-------------|-------------|-----| | SMTP email delivery | Custom fetch to mail API | `nodemailer` | Handles STARTTLS, auth, connection pooling, error codes | | Form validation | Manual regex/string checks | `zod` (already installed) | Already in project; handles type coercion, error messages | | Image optimization | Raw `