Country
diff --git a/bookswap/bookswap_client/src/components/Login/Signup.js b/bookswap/bookswap_client/src/components/Login/Signup.js
index 12ceee3..e3df6ac 100644
--- a/bookswap/bookswap_client/src/components/Login/Signup.js
+++ b/bookswap/bookswap_client/src/components/Login/Signup.js
@@ -16,6 +16,10 @@ class Signup extends Component{
userEmail : "",
password : "",
name :"",
+ address:"",
+ city:"",
+ stateName:"",
+ zipcode:"",
errorMessage : "",
successFlag :false
}
@@ -40,7 +44,34 @@ class Signup extends Component{
name : e.target.value
})
}
-
+
+ //name change handler to update state variable with the text entered by the user
+ addressChangeHandler = (e) => {
+ this.setState({
+ address : e.target.value
+ })
+ }
+
+ //name change handler to update state variable with the text entered by the user
+ zipcodeChangeHandler = (e) => {
+ this.setState({
+ zipcode : e.target.value
+ })
+ }
+
+ //name change handler to update state variable with the text entered by the user
+ stateNameChangeHandler = (e) => {
+ this.setState({
+ stateName : e.target.value
+ })
+ }
+
+ //name change handler to update state variable with the text entered by the user
+ cityChangeHandler = (e) => {
+ this.setState({
+ city : e.target.value
+ })
+ }
//submit Login handler to send a request to the node backend
@@ -52,6 +83,10 @@ class Signup extends Component{
userEmail : this.state.userEmail,
password : this.state.password,
name : this.state.name,
+ address: this.state.address,
+ city: this.state.city,
+ stateName: this.state.stateName,
+ zipcode: this.state.zipcode
}
console.log(data);
//set the with credentials to true
@@ -112,6 +147,22 @@ class Signup extends Component{