We need to update the existing contact form to improve its functionality and move away from deprecated dependencies. The form is currently using the deprecated Email JS, and we need to transition to a more robust and maintainable solution.
Requirements
UI Logic Implementation:
Implement the UI logic for the contact form using shadcn/ui, react-hook-form, and zod for validation.
Ensure that the form has proper input fields, error handling, and validation messages based on the design provided.
Validation:
Use react-hook-form for managing the form's state.
Use zod for schema-based validation to ensure data integrity.
Validate user inputs such as email, name, and message fields according to specified rules.
Backend Modification:
Create a backend for the contact form within the Next.js application itself.
Implement an API route to handle form submissions, ensuring data is processed and sent to the desired endpoint or email service securely.
Remove any dependencies on Email JS and ensure a smooth transition.
Guidelines
Follow the existing code style and structure for consistency.
Write clear and concise commit messages.
Test the functionality thoroughly before submitting a pull request.
Ensure that any new features or changes are well-documented.
Task: Implement Contact Form Logic
Description
We need to update the existing contact form to improve its functionality and move away from deprecated dependencies. The form is currently using the deprecated Email JS, and we need to transition to a more robust and maintainable solution.
Requirements
UI Logic Implementation:
Validation:
Backend Modification:
Guidelines