diff --git a/package-lock.json b/package-lock.json index 103f54323..1124feb73 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "emailjs-com": "^2.6.4", "react": "^17.0.1", "react-dom": "^17.0.1", + "react-icons": "^5.2.1", "react-scripts": "^5.0.1", "smooth-scroll": "^16.1.3" } @@ -16107,6 +16108,14 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz", "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==" }, + "node_modules/react-icons": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.2.1.tgz", + "integrity": "sha512-zdbW5GstTzXaVKvGSyTaBalt7HSfuK5ovrzlpyiWHAFXndXTdd/1hdDHI4xBM1Mn7YriT6aqESucFl9kEXzrdw==", + "peerDependencies": { + "react": "*" + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", diff --git a/package.json b/package.json index cfa50c879..87d359da1 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "emailjs-com": "^2.6.4", "react": "^17.0.1", "react-dom": "^17.0.1", + "react-icons": "^5.2.1", "react-scripts": "^5.0.1", "smooth-scroll": "^16.1.3" }, diff --git a/src/components/contact.jsx b/src/components/contact.jsx index be29734ed..8c7fbdc61 100644 --- a/src/components/contact.jsx +++ b/src/components/contact.jsx @@ -1,12 +1,14 @@ -import { useState } from "react"; +import React, { useState } from "react"; import emailjs from "emailjs-com"; -import React from "react"; +import { FiFacebook, FiTwitter, FiYoutube, FiInstagram } from "react-icons/fi"; +import { SiTiktok } from "react-icons/si"; const initialState = { name: "", email: "", message: "", }; + export const Contact = (props) => { const [{ name, email, message }, setState] = useState(initialState); @@ -14,15 +16,13 @@ export const Contact = (props) => { const { name, value } = e.target; setState((prevState) => ({ ...prevState, [name]: value })); }; + const clearState = () => setState({ ...initialState }); - - + const handleSubmit = (e) => { e.preventDefault(); console.log(name, email, message); - - {/* replace below with your own Service ID, Template ID and Public Key from your EmailJS account */ } - + emailjs .sendForm("YOUR_SERVICE_ID", "YOUR_TEMPLATE_ID", e.target, "YOUR_PUBLIC_KEY") .then( @@ -35,6 +35,7 @@ export const Contact = (props) => { } ); }; + return (