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 (
@@ -128,20 +129,105 @@ export const Contact = (props) => {
-
    -
  • - - + diff --git a/src/data/data.json b/src/data/data.json index 4055cd61a..abe3bab43 100644 --- a/src/data/data.json +++ b/src/data/data.json @@ -157,7 +157,9 @@ "email": "info@company.com", "facebook": "fb.com", "twitter": "twitter.com", - "youtube": "youtube.com" + "youtube": "youtube.com", + "instagram": "instagram.com", + "tiktok" : "tiktok.com" }, "Features": [ { diff --git a/yarn.lock b/yarn.lock index 36c0c6913..42d72508c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4688,11 +4688,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -7605,6 +7600,11 @@ react-error-overlay@^6.0.11: resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== +react-icons@^5.2.1: + version "5.2.1" + resolved "https://registry.npmjs.org/react-icons/-/react-icons-5.2.1.tgz" + integrity sha512-zdbW5GstTzXaVKvGSyTaBalt7HSfuK5ovrzlpyiWHAFXndXTdd/1hdDHI4xBM1Mn7YriT6aqESucFl9kEXzrdw== + react-is@^16.12.0, react-is@^16.13.1, react-is@^16.8.4: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"