diff --git a/src/pages/contacts.js b/src/pages/contacts.js deleted file mode 100644 index 26dfb82703..0000000000 --- a/src/pages/contacts.js +++ /dev/null @@ -1,176 +0,0 @@ -import React from 'react'; -import ReactGA from 'react-ga'; -import { navigateTo } from 'gatsby-link'; -import Sidebar from '../components/Sidebar'; -import SEO from '../components/SEO'; - -import './contacts.scss'; - -export default class Contact extends React.Component { - constructor(props) { - super(props); - this.state = {}; - } - - // eslint-disable-next-line react/sort-comp - static encode(data) { - const formData = new FormData(); - // eslint-disable-next-line no-restricted-syntax - for (const key of Object.keys(data)) { - formData.append(key, data[key]); - } - return formData; - } - - handleChange(e) { - this.setState({ [e.target.name]: e.target.value }); - } - - handleAttachment(e) { - this.setState({ [e.target.name]: e.target.files[0] }); - } - - handleSubmit(e) { - e.preventDefault(); - const form = e.target; - ReactGA.event({ - category: 'User', - action: 'Submit Contact Form', - }); - fetch('https://getform.io/f/897f187e-876d-42a7-b300-7c235af72e6d', { - method: 'POST', - body: Contact.encode({ - 'form-name': form.getAttribute('name'), - ...this.state, - }), - }) - .then(() => navigateTo(form.getAttribute('action'))) - .catch((error) => alert(error)); - } - - render() { - return ( -
-
- -
-

 Contact Form

-

Please your Comment here.

-
- -
- {/* The `form-name` hidden field is required to support form submissions without JavaScript */} - - -

- -

-

- -

-

- -

-

-