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

Conversation

@trowacat
Copy link
Contributor

commented Feb 26, 2019

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

This comment has been minimized.

Copy link
Collaborator

commented Feb 26, 2019

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 trowacat force-pushed the trowacat:register branch from dcf4efd to 14c48e5 Feb 26, 2019
@trowacat

This comment has been minimized.

Copy link
Contributor Author

commented Feb 26, 2019

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

This comment has been minimized.

Copy link
@joelwass

joelwass Feb 26, 2019

Collaborator

linter failed, expects space after /* and before */

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

This comment has been minimized.

Copy link
@joelwass

joelwass Feb 26, 2019

Collaborator

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
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.