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

Implemented register component #47

Merged
merged 4 commits into from Feb 27, 2019
Merged

Conversation

trowacat
Copy link
Contributor

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.

@joelwass
Copy link
Member

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.

@trowacat
Copy link
Contributor Author

@joelwass Thank you, I've made changes following your suggestion. Much better approach.

@@ -33,8 +39,21 @@ class LoginForm extends Component {
switchTwoClicked={() => this.updateLoginType('teacher')}
/>
</div>
{/*TODO SETUP APPROPRIATE ACTION CALL FOR SIGNIN OR SIGNUP*/}
Copy link
Member

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 */

<form action='api/user/login' method='post'>
<div className='panel'>
{this.state.register &&
Copy link
Member

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

@joelwass joelwass merged commit b386879 into teacherfund:master Feb 27, 2019
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