dipesh2508 / health-optima

https://www.healthoptima.in/
MIT License
3 stars 1 forks source link

Implement Contact Form Logic #8

Open dipesh2508 opened 2 weeks ago

dipesh2508 commented 2 weeks ago

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

  1. 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.
  2. 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.
  3. 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

tushar-agarwal7 commented 1 week ago

@dipesh2508 plz assign this issue to me

dipesh2508 commented 1 week ago

@tushar-agarwal7 Assigned

dipesh2508 commented 1 week ago

create a fork and create a new branch there, and raise a pr when you're done