diff --git a/.gitignore b/.gitignore index 5fe43d8..fa43dd4 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -# /src/utils/auth_config.json \ No newline at end of file +/src/utils/auth_config.json +/src/utils/secret.js \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c4e451e..b2fcfde 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14215,4 +14215,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 5b7fabf..800bd46 100644 --- a/package.json +++ b/package.json @@ -33,4 +33,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/src/components/ContactForm.jsx b/src/components/ContactForm.jsx index d04bf19..f52a47b 100644 --- a/src/components/ContactForm.jsx +++ b/src/components/ContactForm.jsx @@ -1,18 +1,13 @@ import React, { useState } from "react"; -// import { useInput } from "../utils/inputHook"; +// import { notificationMail, confirmationMail } from "../utils/mail"; -export const ContactForm = ({ onSubmit }) => { +export const ContactForm = ({ setIsSubmitted }) => { const [firstName, setFirstName] = useState(""); const [lastName, setLastName] = useState(""); const [email, setEmail] = useState(""); const [phone, setPhone] = useState(""); const [message, setMessage] = useState(""); - const handleSubmit = ev => { - ev.preventDefault(); - onSubmit(true); - }; - const changeFirstName = ev => { const { value } = ev.target; setFirstName(value); @@ -34,6 +29,14 @@ export const ContactForm = ({ onSubmit }) => { setMessage(value); }; + const handleSubmit = ev => { + ev.preventDefault(); + // confirmationMail(email); + // const body = `Sender: ${firstName} ${lastName}\nPhone: ${phone}\nMessage: ${message}`; + // notificationMail(email, `New message from ${firstName} ${lastName}`, body); + setIsSubmitted(true); + }; + return (