dhairyagothi / StationGuide

Station Guide - your platform guide
https://stationguide.onrender.com/
MIT License
44 stars 120 forks source link

[Backend Issue]: Missing handleRegister function logic in register.jsx for form submission. #104

Open Yashhuc opened 1 month ago

Yashhuc commented 1 month ago

🛠️ Backend Issue

Description

The Register component in register.jsx contains a form for user registration, but the handleRegister function lacks the necessary logic to handle form submission and communicate with the backend. This prevents users from successfully registering, as their data is not being sent to the API.

Steps to Reproduce

  1. Click the "Register" button.
  2. Fill in the registration form fields (Name, Phone Number, Email, and Password).
  3. Observe that no action is taken, and the form data is not submitted.

Proposed Solution: Implement the handleRegister function as follows:

  1. Collect the user data from the form fields (stored in state).
  2. Use fetch or axios to send a POST request to the backend registration endpoint (/api/register).
  3. Handle the success or failure response from the backend and provide appropriate feedback to the user.

Screenshot

image

Are you participating in GSSoC?

github-actions[bot] commented 1 month ago

Thank you for raising this issue! We'll look into it as soon as possible. Please ensure that the issue is not duplicate, and you read [CONTRIBUTING.md]() carefully. Your contributions are highly appreciated! 😊

dhairyagothi commented 1 month ago

good go for it @Yashhuc

MohammedJunaid02 commented 4 weeks ago

Shall i start working on this issue? @dhairyagothi @Yashhuc

dhairyagothi commented 4 weeks ago

@Yashhuc please update

Yashhuc commented 4 weeks ago

Hey, thanks for your patience. I'm still working on it. I will give you the final update by tomorrow evening.

Yashhuc commented 4 weeks ago

Hey @dhairyagothi . I have implemented the handle register functionality as part of the project. However, I haven't been able to test it on my local server since I don't have MongoDB experience. I have updated the fetch URL to the deployed URL instead.

image

I will be creating a pull request for this update, and it would be great if you could check it on your end and proceed from there. If you are not satisfied, you may assign this to someone else. Thanks for your patience.

dhairyagothi commented 3 weeks ago

Hey @dhairyagothi . I have implemented the handle register functionality as part of the project. However, I haven't been able to test it on my local server since I don't have MongoDB experience. I have updated the fetch URL to the deployed URL instead.

image

I will be creating a pull request for this update, and it would be great if you could check it on your end and proceed from there. If you are not satisfied, you may assign this to someone else. Thanks for your patience.

ok i will check it backend is hosted on vercel

MohammedJunaid02 commented 3 weeks ago

Hey @dhairyagothi , is this issue resolved completely or not yet. If not yet please assign this to me, i will try to fix it completely.