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

Login & Sign Up pages #1

Merged
merged 36 commits into from Jul 15, 2022
Merged

Login & Sign Up pages #1

merged 36 commits into from Jul 15, 2022

Conversation

theforbiddenpool
Copy link
Owner

Created the pages for login and sign up.

Newly installed dependencies are Chakra UI, Formik, React Icons and Yup.
Initially I had installed Material UI, however it slowed down TypeScript's linting remarkably (view microsoft/TypeScript#34801 and mui/material-ui#19113), making development impossible.

theforbiddenpool added 30 commits May 31, 2022 19:13
The LoadingButton component is still in @mui/lab, therefore I've
installed such library for ease-of-use.
This component has two possible styles: button and link. It was inspired
by the example provided by MUI
(https://github.com/mui/material-ui/blob/HEAD/examples/nextjs-with-typescript/src/Link.tsx).

TypeScript shoots out some errors about the ref and properties not being
compatible. This is due to the union of the MuiLinkProps and
MuiButtonProps. Even it being a tagged union does not seem to make a
different.
I couldn't figure out how to solve these errors, so I just decided to
make TypeScript ignore these lines. It's not the best solution, but
maybe in the future I can figure out a way to fix these errors.
For now, everything seems to work fine and specific props are recognized
beloging to the correct element.
After the adventure down to MUI energy-sucking types, I've decided it's
better to switch to another component library. When making edits I had to
wait upwards of 5-15secs for the TypeScript errors to update. This made
development impossible and completely unefficient.

Chakra seems to be a good and popular library, with good amount of
components.
A onSubmit prop was added to the LoginForm component to enable easier
testing. It might generally be useful in the future to.
I decided to have all the schemas in their own place so the validation
is reusable in multiple places. This will also guarantee that the
validation stays consistent throughout the app.
@theforbiddenpool theforbiddenpool merged commit 0066f5f into master Jul 15, 2022
@theforbiddenpool theforbiddenpool deleted the login-signup-pages branch July 15, 2022 13:53
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

1 participant