computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
5 years ago
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||
5 years ago
|
import { faFacebookSquare, faRedditSquare, faTwitterSquare } from '@fortawesome/free-brands-svg-icons'
|
||
5 years ago
|
|
||
5 years ago
|
import { getFacebookShareUrl, getRedditShareUrl, getTwitterShareUrl } from "lib/url";
|
||
5 years ago
|
import { ShareIcon, ShareIconsList, ShareWrap } from './style';
|
||
5 years ago
|
|
||
5 years ago
|
const SharePage = ({
|
||
|
url,
|
||
|
title,
|
||
|
twitterUsername,
|
||
5 years ago
|
}) => (
|
||
5 years ago
|
<ShareWrap>
|
||
|
<ShareIconsList className="d-sm-none d-md-none d-lg-flex d-xl-flex">
|
||
5 years ago
|
<ShareIcon
|
||
|
href={ getTwitterShareUrl({
|
||
|
text: `${title}${twitterUsername ? `by @${twitterUsername}` : ''}`,
|
||
|
url: url
|
||
|
})}
|
||
|
target="_blank"
|
||
|
>
|
||
5 years ago
|
<FontAwesomeIcon icon={ faTwitterSquare } />
|
||
|
</ShareIcon>
|
||
5 years ago
|
<ShareIcon href={ getFacebookShareUrl({ text: title, url: url }) } target="_blank">
|
||
5 years ago
|
<FontAwesomeIcon icon={ faFacebookSquare } />
|
||
5 years ago
|
</ShareIcon>
|
||
5 years ago
|
<ShareIcon href={ getRedditShareUrl({ text: title, url: url })} target="_blank">
|
||
5 years ago
|
<FontAwesomeIcon icon={ faRedditSquare } />
|
||
5 years ago
|
</ShareIcon>
|
||
5 years ago
|
</ShareIconsList>
|
||
|
</ShareWrap>
|
||
|
);
|
||
|
|
||
5 years ago
|
export default SharePage;
|