Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TikTok and Instagram Icons Using React-Icons Due to FontAwesome Issue #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
120 changes: 103 additions & 17 deletions src/components/contact.jsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
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);

const handleChange = (e) => {
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(
Expand All @@ -35,6 +35,7 @@ export const Contact = (props) => {
}
);
};

return (
<div>
<div id="contact">
Expand Down Expand Up @@ -128,20 +129,105 @@ export const Contact = (props) => {
<div className="col-md-12">
<div className="row">
<div className="social">
<ul>
<li>
<a href={props.data ? props.data.facebook : "/"}>
<i className="fa fa-facebook"></i>
<ul style={{ position: 'relative', listStyle: 'none', padding: 0 }}>
<li style={{ display: 'inline', margin: '0 15px' }}>
<a
href={props.data ? props.data.facebook : "/"}
target="_blank"
rel="noopener noreferrer"
style={{
fontSize: '1.5em',
color: 'white',
border: '2px solid white',
borderRadius: '50%',
padding: '10px',
display: 'inline-block',
textAlign: 'center',
width: '50px',
height: '50px',
}}
>
<FiFacebook />
</a>
</li>
<li style={{ display: 'inline', margin: '0 15px' }}>
<a
href={props.data ? props.data.twitter : "/"}
target="_blank"
rel="noopener noreferrer"
style={{
fontSize: '1.5em',
color: 'white',
border: '2px solid white',
borderRadius: '50%',
padding: '10px',
display: 'inline-block',
textAlign: 'center',
width: '50px',
height: '50px',
}}
>
<FiTwitter />
</a>
</li>
<li style={{ display: 'inline', margin: '0 15px' }}>
<a
href={props.data ? props.data.youtube : "/"}
target="_blank"
rel="noopener noreferrer"
style={{
fontSize: '1.5em',
color: 'white',
border: '2px solid white',
borderRadius: '50%',
padding: '10px',
display: 'inline-block',
textAlign: 'center',
width: '50px',
height: '50px',
}}
>
<FiYoutube />
</a>
</li>
<li>
<a href={props.data ? props.data.twitter : "/"}>
<i className="fa fa-twitter"></i>
<li style={{ display: 'inline', margin: '0 15px' }}>
<a
href={props.data ? props.data.instagram : "/"}
target="_blank"
rel="noopener noreferrer"
style={{
fontSize: '1.5em',
color: 'white',
border: '2px solid white',
borderRadius: '50%',
padding: '10px',
display: 'inline-block',
textAlign: 'center',
width: '50px',
height: '50px',
}}
>
<FiInstagram />
</a>
</li>
<li>
<a href={props.data ? props.data.youtube : "/"}>
<i className="fa fa-youtube"></i>
<li style={{ display: 'inline', margin: '0 15px' }}>
<a
href={props.data ? props.data.tiktok : "/"}
target="_blank"
rel="noopener noreferrer"
style={{
fontSize: '1.5em',
color: 'white',
border: '2px solid white',
borderRadius: '50%',
padding: '10px',
display: 'inline-block',
textAlign: 'center',
width: '50px',
height: '50px',
}}
>
<SiTiktok />
</a>
</li>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion src/data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@
"email": "[email protected]",
"facebook": "fb.com",
"twitter": "twitter.com",
"youtube": "youtube.com"
"youtube": "youtube.com",
"instagram": "instagram.com",
"tiktok" : "tiktok.com"
},
"Features": [
{
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down