specollective / spec-frontend

Frontend for SPEC's informational website.
3 stars 0 forks source link

102 wire up contact form api #120

Closed samvmdev closed 1 year ago

samvmdev commented 1 year ago

Pull Request Process

Describe the issue you are trying to resolve

This PR enables the Nodemailer email service on the website contact form.

Describe the changes you've made to resolve the issue

The original tutorial code suggested a switch/case scenario to account for multiple HTTP request types.

@YolineB and I took a look and were wondering if an if/else statement would suffice since this route would likely just use a POST method and not the other request types.

Add screenshots of the UI before and after your changes have been made

No UI changes were made with this PR.

UI with sample inputs before email sent: Screen Shot 2023-08-16 at 5 47 23 PM

Email received: Screen Shot 2023-08-16 at 5 48 21 PM

Additional Notes

Hoping to address unit tests / add to the existing Jest tests a separate PR.

Code Review Checklist