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
Implemented register component #47
Conversation
If possible I'd try to refactor the existing loginForm to accept an additional field (full name) and then just have the button do something different (register, which you can leave as a TODO since it's API related), instead of copy pasting the sign in form. thoughts on that? I think it's just adding a "sign up" button to the login form, adding a "registering" field to state (boolean), and then toggling an extra input field (full name) based on the state of the component. |
@joelwass Thank you, I've made changes following your suggestion. Much better approach. |
components/loginform.js
Outdated
@@ -33,8 +39,21 @@ class LoginForm extends Component { | |||
switchTwoClicked={() => this.updateLoginType('teacher')} | |||
/> | |||
</div> | |||
{/*TODO SETUP APPROPRIATE ACTION CALL FOR SIGNIN OR SIGNUP*/} |
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.
linter failed, expects space after /* and before */
components/loginform.js
Outdated
<form action='api/user/login' method='post'> | ||
<div className='panel'> | ||
{this.state.register && |
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.
trailing space not allowed.
you can run npm run lint
and npm run fix
to auto lint
This is in response to #3
Implemented a register component in the same style as the current sign in component.
The signInSignUp page is named in camel case which causes the page to be unreachable from the nav as it is currently configured. Not sure if this was intentional, therefore I left it.