From c6a48891ad20eda6ed5530e843b5580c876576cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Berk=20Ba=C5=9Fo=C4=9Flu?= Date: Wed, 31 Mar 2021 20:01:35 -0400 Subject: [PATCH] Fixed the Contact Form. --- src/homePage/homePage.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/homePage/homePage.js b/src/homePage/homePage.js index 28dcf13..2c6cbdb 100644 --- a/src/homePage/homePage.js +++ b/src/homePage/homePage.js @@ -59,8 +59,8 @@ class homePage extends Component { type="text" className="form-control" placeholder="First Name" - value={this.state.name} - onChange={this.onNameChange.bind(this)} + value={this.state.firstname} + onChange={this.onFirstNameChange.bind(this)} />
@@ -68,8 +68,8 @@ class homePage extends Component { type="text" className="form-control" placeholder="Last Name" - value={this.state.name} - onChange={this.onNameChange.bind(this)} + value={this.state.lastname} + onChange={this.onLastNameChange.bind(this)} />
@@ -105,8 +105,12 @@ class homePage extends Component { ); } - onNameChange(event) { - this.setState({ name: event.target.value }); + onFirstNameChange(event) { + this.setState({ firstname: event.target.value }); + } + + onLastNameChange(event) { + this.setState({ lastname: event.target.value }); } onEmailChange(event) {