Signup is working

This commit is contained in:
2019-10-11 17:34:35 -04:00
parent 00ed9d64c5
commit 27efa858d5
6 changed files with 42 additions and 7 deletions

View File

@@ -67,6 +67,7 @@ export class Signup extends Component {
password: this.state.password,
confirmPassword: this.state.confirmPassword
};
console.log(signupData)
this.props.signupUser(signupData, this.props.history);
};
@@ -95,6 +96,18 @@ export class Signup extends Component {
Create a new account
</Typography>
<form noValidate onSubmit={this.handleSubmit}>
<TextField
id="handle"
name="handle"
label="Username*"
className={classes.textField}
value={this.state.handle}
helperText={errors.handle}
error={errors.handle ? true : false}
variant="outlined"
onChange={this.handleChange}
fullWidth
/>
<TextField
id="email"
name="email"
@@ -110,7 +123,7 @@ export class Signup extends Component {
<TextField
id="password"
name="password"
label="password*"
label="Password*"
className={classes.textField}
value={this.state.password}
helperText={errors.password}
@@ -120,6 +133,19 @@ export class Signup extends Component {
onChange={this.handleChange}
fullWidth
/>
<TextField
id="confirmPassword"
name="confirmPassword"
label="Confirm Password*"
className={classes.textField}
value={this.state.confirmPassword}
helperText={errors.confirmPassword}
error={errors.confirmPassword ? true : false}
type="password"
variant="outlined"
onChange={this.handleChange}
fullWidth
/>
<Button
type="submit"
variant="contained"