Add hackernews share url

This commit is contained in:
Kamran Ahmed
2020-03-14 12:48:11 +04:00
parent 689f24e0f1
commit 56bf52e641
2 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@ export const ShareIcon = styled.a`
width: 22px;
height: 22px;
margin-bottom: 8px;
text-align: center;
svg {
height: 22px !important;

View File

@ -1,7 +1,7 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFacebookSquare, faRedditSquare, faTwitterSquare } from '@fortawesome/free-brands-svg-icons'
import { faFacebookSquare, faHackerNewsSquare, faRedditSquare, faTwitterSquare } from '@fortawesome/free-brands-svg-icons';
import { getFacebookShareUrl, getRedditShareUrl, getTwitterShareUrl } from "lib/url";
import { getFacebookShareUrl, getHnShareUrl, getRedditShareUrl, getTwitterShareUrl } from 'lib/url';
import { ShareIconsList, ShareWrap } from './style';
import { ShareIcon } from 'components/share-icon';
@ -24,6 +24,9 @@ const SharePage = ({
<ShareIcon href={ getFacebookShareUrl({ text: title, url: url }) } target="_blank">
<FontAwesomeIcon icon={ faFacebookSquare } />
</ShareIcon>
<ShareIcon href={ getHnShareUrl({ text: title, url: url })} target="_blank">
<FontAwesomeIcon icon={faHackerNewsSquare}/>
</ShareIcon>
<ShareIcon href={ getRedditShareUrl({ text: title, url: url })} target="_blank">
<FontAwesomeIcon icon={ faRedditSquare } />
</ShareIcon>