diff --git a/client/src/pages/SignUpForm.js b/client/src/pages/SignUpForm.js index 48636c6..d69c2ac 100644 --- a/client/src/pages/SignUpForm.js +++ b/client/src/pages/SignUpForm.js @@ -2,66 +2,90 @@ import React, { Component } from 'react'; import { Link } from 'react-router-dom'; class SignUpForm extends Component { - constructor() { - super(); + constructor() { + super(); - this.state = { - email: '', - password: '', - name: '', - hasAgreed: false - }; + this.state = { + email: '', + password: '', + name: '', + hasAgreed: false, + disabledButtonColor: '#9fcfff', + disabledTextColor: '#808080' + }; - this.handleChange = this.handleChange.bind(this); - this.handleSubmit = this.handleSubmit.bind(this); - } + this.handleChange = this.handleChange.bind(this); + this.handleSubmit = this.handleSubmit.bind(this); + } - handleChange(e) { - let target = e.target; - let value = target.type === 'checkbox' ? target.checked : target.value; - let name = target.name; + handleChange(e) { + let target = e.target; + let value = target.type === 'checkbox' ? target.checked : target.value; + let name = target.name; - this.setState({ - [name]: value - }); - } + this.setState({ + [name]: value + }); + } - handleSubmit(e) { - e.preventDefault(); + handleSubmit(e) { + e.preventDefault(); - console.log('The form was submitted with the following data:'); - console.log(this.state); - } + console.log('The form was submitted with the following data:'); + console.log(this.state); + } + + render() { - render() { - return ( + let content = null; + if (this.state.email.length && this.state.password.length && this.state.name.length && this.state.hasAgreed) { + content = + } + else { + content = + } + + return ( +
-
-
- - -
-
- - -
-
- - -
+ +
+ + +
+
+ + +
+
+ + +
-
- -
+
+ +
-
- I'm already member -
-
-
- ); - } +
+ {content} + I'm already member +
+ +
+ + ); + } } export default SignUpForm; \ No newline at end of file