krishnaacharyaa / wanderlust

WanderLust is a MERN travel blog website 🚀 This project is aimed to help people to contribute in open source, upskill in react and master git.
https://wanderlust-beta.vercel.app/
MIT License
221 stars 1.24k forks source link

fix-#77: changed the traditional form to react hook form #407

Closed Ameerjafar closed 5 months ago

Ameerjafar commented 5 months ago

Summary

I have converted the react traditional form to the react hook form.

Description

I have done the react hook form to reduce the lot of re-renders at the same time users can easily identify the error while they are trying to add the blog in the application and for the form validation i have used zod library.

Images

https://github.com/krishnaacharyaa/wanderlust/assets/105500361/16fc38ec-686c-40dd-8ed6-64ed2595ff5d

Issue(s) Addressed

Enter the issue number of the bug(s) that this PR fixes

Prerequisites

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
wanderlust ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2024 6:13am
wanderlust-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 8, 2024 6:13am
github-actions[bot] commented 5 months ago

Hey @Ameerjafar! Thanks for sticking to the guidelines! High five! 🙌🏻

Ameerjafar commented 5 months ago

@krishnaacharyaa can you kindly review this one sir.

krishnaacharyaa commented 5 months ago

@Ameerjafar can you kindly add the video

krishnaacharyaa commented 5 months ago
image

Kindly update the validations to these and messages also,

And once go through https://github.com/krishnaacharyaa/wanderlust/pull/83/files, might be of help

github-actions[bot] commented 5 months ago

Hey @Ameerjafar! Thanks for sticking to the guidelines! High five! 🙌🏻

krishnaacharyaa commented 5 months ago

@Ameerjafar in the video, when no categories is selected it says "max three categories" and when you click 2 categories it won't go...

Shoudln't that error come when you click more than 3 categories? And when you haven't clicked it should say please select a category something and when you click a category the error message should go

github-actions[bot] commented 5 months ago

Hey @Ameerjafar! Thanks for sticking to the guidelines! High five! 🙌🏻

github-actions[bot] commented 5 months ago

Hey @Ameerjafar! Thanks for sticking to the guidelines! High five! 🙌🏻