Changed variable names

This commit is contained in:
Aaron Sun 2019-10-01 17:55:17 -04:00
parent a25d022f49
commit 585a0c1022

View File

@ -41,7 +41,7 @@ class signup extends Component {
super(); super();
this.state = { this.state = {
email: '', email: '',
username: '', handle: '',
password: '', password: '',
confirmPassword: '', confirmPassword: '',
errors: {} errors: {}
@ -51,7 +51,7 @@ class signup extends Component {
event.preventDefault(); event.preventDefault();
const newUserData = { const newUserData = {
email: this.state.email, email: this.state.email,
username: this.state.username, handle: this.state.handle,
password: this.state.password, password: this.state.password,
confirmPassword: this.state.confirmPassword confirmPassword: this.state.confirmPassword
}; };
@ -83,13 +83,13 @@ class signup extends Component {
Sign up Sign up
</Typography> </Typography>
<form noValidate onSubmit={this.handleSubmit}> <form noValidate onSubmit={this.handleSubmit}>
<TextField id="email" name="email" type="email" label="Email" className={classes.textField} <TextField id="email" name="email" type="email" label="Email" className={classes.textField}
helperText={errors.email} error={errors.email ? true : false} helperText={errors.email} error={errors.email ? true : false}
value={this.state.email} onChange={this.handleChange} /> value={this.state.email} onChange={this.handleChange} />
<br /> <br />
<TextField id="username" name="username" type="text" label="Username" className={classes.textField} <TextField id="handle" name="handle" type="text" label="Username" className={classes.textField}
helperText={errors.username} error={errors.username ? true : false} helperText={errors.handle} error={errors.handle ? true : false}
value={this.state.username} onChange={this.handleChange} /> value={this.state.handle} onChange={this.handleChange} />
<br /> <br />
<TextField id="password" name="password" type="password" label="Password" className={classes.textField} <TextField id="password" name="password" type="password" label="Password" className={classes.textField}
helperText={errors.password} error={errors.password ? true : false} helperText={errors.password} error={errors.password ? true : false}