Skip to content
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

Add unconnected login form and page #21

Merged
merged 19 commits into from
Jun 7, 2020
Merged

Add unconnected login form and page #21

merged 19 commits into from
Jun 7, 2020

Conversation

grahamhoyes
Copy link
Member

@grahamhoyes grahamhoyes commented Jun 7, 2020

Adds a login form and page that currently don't do anything, pending being hooked up to Redux in a separate PR. The form is at /login.

The form itself uses formik to handle all the React form magic, and yup for the form validation.

Also moved the header component into the Dashboard page, so that it could selectively be rendered on the login page without the navigation links.

Once this is hooked up to redux, should check if the user is already logged in and send them to the home page if so (conversely, if they aren't logged in on the home page, send them here. Should do this by making an API request and getting 401'd).

React Testing Library and JSDOM were updated to allow for some cool new ways of testing formik (which handles everything asyncronously) with RTL's waitFor.

Copy link
Contributor

@lisa-sa-li lisa-sa-li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beautiful

@grahamhoyes grahamhoyes merged commit 4097670 into develop Jun 7, 2020
@grahamhoyes grahamhoyes deleted the login_form branch June 7, 2020 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants