You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For displaying static error messages like "Invalid or expired invite", I would opt for using a simple p tag.
For displaying dynamic error messages that result from user actions (like password confirmation), I would react-hot-toast (which is already in the project).
Success Criteria
If token query param is not provided, redirect to /
If 400 response, display "Invalid or expired invite"
The email and name fields are pre-filled with the results of the fetch request to /api/invites/[token]
If the passwords do not match, an error appears
Form is submitted to /api/users
On success, sign the user in and redirect to /
The user registration form matches the design
The user registration form shows the correct fields relative to the selected user type
The user registration form is functional at all dimension presets from Laptop and up
The text was updated successfully, but these errors were encountered:
kavinphan
changed the title
User Registration Form
User Registration Page
Feb 4, 2025
Description
Create the user registration page (at
/register
) to match the design.Note that this flow is a bit complex:
/register?token=${TOKEN}
token
is not provided, redirect to/
/api/invites/[token]
400
response, display error message "Invalid or expired invite"/api/users
withinviteToken
andpassword
form data/api/users
route handler was created hereFor displaying static error messages like "Invalid or expired invite", I would opt for using a simple
p
tag.For displaying dynamic error messages that result from user actions (like password confirmation), I would react-hot-toast (which is already in the project).
Success Criteria
token
query param is not provided, redirect to/
400
response, display "Invalid or expired invite"/api/invites/[token]
/api/users
/
Laptop
and upThe text was updated successfully, but these errors were encountered: