Conversation
…-form-responses-directly-to-email
…onses-directly-to-email Update Contact Us
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…del references in API and schema files
|
LGTM |
Enhance Sponsors component with loading state and skeleton UI; fix mo…
… templates and logging for better debuggingInitial commit: GitFest 2025 website with dark theme and green accents
Enhance contact form validation and submission process; improve email templates and logging for better debugging
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the project with email functionality for the contact form, UI improvements for the gallery and sponsor sections, and fixes to MongoDB model definitions. The changes implement a comprehensive email system using Nodemailer for contact form submissions and improve the overall user experience with loading states and better validation.
Key changes include:
- Implementation of professional email templates and Nodemailer integration for contact form submissions
- Addition of loading states with skeleton components for the sponsors section
- Enhanced form validation and user feedback in the contact form
- Bug fixes in MongoDB model definitions to prevent duplicate model creation
Reviewed Changes
Copilot reviewed 13 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pages/api/v1/contact/nodemailer.js | New comprehensive email service with professional HTML templates for contact notifications |
| pages/api/v1/contact/index.js | Complete refactor to use email service with enhanced validation and error handling |
| components/Contact/ContactForm.jsx | Enhanced frontend validation, better user feedback, and improved form layout |
| components/Home/Sponsors.jsx | Added loading state with skeleton components for better UX |
| utils/models/*.model.js | Fixed MongoDB model creation to use mongoose.models instead of mongoose.model |
| package.json | Added nodemailer dependency |
| styles/globals.css | Added Swiper carousel styling |
| components/Home/Gallery.jsx | Added new gallery images and improved Swiper configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| </svg> | ||
| GitHub | ||
| </a> | ||
| <a href="https://githubsrmist.in" |
There was a problem hiding this comment.
The website URL 'https://githubsrmist.in' in the confirmation email template may be incorrect. Based on the sitemap file, the actual domain appears to be 'https://githubsrmist.tech'.
| <a href="https://githubsrmist.in" | |
| <a href="https://githubsrmist.tech" |
| name, | ||
| email, | ||
| message | ||
| email: email.replace(/(.{3}).*(@.*)/, "$1***$2"), // Mask email for logging |
There was a problem hiding this comment.
The email masking regex is insufficient for security. It only masks after the 3rd character but doesn't handle edge cases like very short email addresses. Consider using a more robust masking approach or logging less sensitive data.
| email: email.replace(/(.{3}).*(@.*)/, "$1***$2"), // Mask email for logging | |
| email: maskEmail(email), // Mask email for logging |
| {formData.message.length > 2000 && ( | ||
| <p className="text-red-500 text-sm -mt-6 mb-2">Message must be less than 2000 characters</p> | ||
| )} | ||
| <div className="text-right text-gray-400 text-xs -mt-6 mb-4"> |
There was a problem hiding this comment.
The textarea element is missing accessibility attributes like 'aria-label' or 'aria-describedby' to properly describe the input field for screen readers, especially since it has validation requirements.
No description provided.