-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend form error handling #125
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start so far. I think we should also try and do some error handling earlier in the form as well. Check the updated ticket for the new requirements which I think make the user experience better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small requested changes, great progress
I think I figured out how we can stop them before they get too far: If you look at the screenshot below, I added a check in the next function to make sure that they aren't submitting too many reviews. The way we do this is fetch all of the users reviews once they open the form, this way we have them loaded in memory. Once they are on the cycle page, they can enter any term, but if they already did 2 reviews, they will be stopped! Since most of the boilerplate is there, try and see if you can implement the logic in the //Todo on your own @Yasoop ! (also remove the console.log lol) ![]() |
For the formatting @Yasoop @suxls if you have prettier installed as a vscode extension you should be able to just save the file and it reformats. If this doesn't work for you follow this quick guide: https://www.digitalocean.com/community/tutorials/how-to-format-code-with-prettier-in-visual-studio-code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lfg
Description
Redirects to a different page if the review form is unsuccesful. Toast popup happens when exiting to home page.
Motivation and Context
Handles backend review form error.
Closes #114
How has this been tested?
Tested errors by putting more than 2 reviews in one cycle and submitting more than 5 reviews total
Screenshots (if appropriate):
If there are more than two reviews in a cycle or more than 5 reviews are submitted, then the submit button on the last page of the form is clicked, redirects to this page.

Types of changes
Checklist: