-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3c9861
commit ab2e683
Showing
5 changed files
with
58 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import { navigateTo } from 'gatsby-link' | |
|
||
function encode(data) { | ||
return Object.keys(data) | ||
.map(key => encodeURIComponent(key) + '=' + encodeURIComponent(data[key])) | ||
.map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(data[key])) | ||
.join('&') | ||
} | ||
|
||
|
@@ -31,7 +31,7 @@ class ContactForm extends React.Component { | |
}), | ||
}) | ||
.then(() => navigateTo(form.getAttribute('action'))) | ||
.catch(error => alert(error)) | ||
.catch((error) => alert(error)) | ||
} | ||
|
||
render() { | ||
|
@@ -42,7 +42,7 @@ class ContactForm extends React.Component { | |
action="/contact/thank-you/" | ||
data-netlify="true" | ||
data-netlify-honeypot="bot-field" | ||
onSubmit={e => this.handleSubmit(e)} | ||
onSubmit={(e) => this.handleSubmit(e)} | ||
> | ||
{/* The `form-name` hidden field is required to support form submissions without JavaScript */} | ||
<input type="hidden" name="form-name" value="contact" /> | ||
|
@@ -56,7 +56,7 @@ class ContactForm extends React.Component { | |
id="name" | ||
placeholder="Your name" | ||
required | ||
onChange={e => this.handleChange(e)} | ||
onChange={(e) => this.handleChange(e)} | ||
/> | ||
</div> | ||
|
||
|
@@ -69,7 +69,7 @@ class ContactForm extends React.Component { | |
id="email" | ||
placeholder="[email protected]" | ||
required | ||
onChange={e => this.handleChange(e)} | ||
onChange={(e) => this.handleChange(e)} | ||
/> | ||
</div> | ||
|
||
|
@@ -83,7 +83,7 @@ class ContactForm extends React.Component { | |
rows="3" | ||
width="100%" | ||
required | ||
onChange={e => this.handleChange(e)} | ||
onChange={(e) => this.handleChange(e)} | ||
/> | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters