Motivation
The Contact Your Senator page has a message form that needs to actually submit to the backend.
Deliverables
- Update the contact form in
/senators/contact/page.tsx to call POST /api/contact
- Form fields: name (required), email (required, validated), message (required, textarea), senator (optional dropdown)
- Show success message after submission: "Your message has been sent!"
- Show error message on failure
- Add client-side validation: email format, message not empty, message max length (1000 chars)
- Disable submit button while sending (prevent double-submit)
Important Notes
Motivation
The Contact Your Senator page has a message form that needs to actually submit to the backend.
Deliverables
/senators/contact/page.tsxto callPOST /api/contactImportant Notes