Skip to content

Commit c75f39c

Browse files
fix social media share links
Signed-off-by: Rajesh-Nagarajan-11 <[email protected]>
1 parent 5b4850a commit c75f39c

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

src/sections/Blog/Blog-single/author.js

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,33 @@ const AboutTheAuthor = (props) => {
3535
<div className="share-section">
3636
<h3>Share</h3>
3737
<div className="share-icons-container">
38-
<TwitterShareButton $url={location.href} title={shareQuote} className="icon">
38+
<a
39+
aria-label="Share on X"
40+
title="Share on X"
41+
href={`https://x.com/intent/tweet?text=${encodeURIComponent(shareQuote || 'Check out this article!')}&url=${encodeURIComponent(location.href)}&hashtags=layer5&via=layer5`}
42+
rel="noopener noreferrer"
43+
className="icon"
44+
>
3945
<AiOutlineTwitter />
40-
</TwitterShareButton>
41-
<FacebookShareButton $url={location.href} quote={shareQuote} className="icon">
46+
</a>
47+
<a
48+
aria-label="Share on Facebook"
49+
title="Share on Facebook"
50+
href={`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(location.href)}&t=${encodeURIComponent(shareQuote || 'Check out this article!')}`}
51+
rel="noopener noreferrer"
52+
className="icon"
53+
>
4254
<FaFacebookF />
43-
</FacebookShareButton>
44-
<LinkedinShareButton $url={location.href} className="icon">
55+
</a>
56+
<a
57+
aria-label="Share on Linkedin"
58+
title="Share on Linkedin"
59+
href={`https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(location.href)}&summary=${encodeURIComponent(shareQuote || 'Check out this article!')}`}
60+
rel="noopener noreferrer"
61+
className="icon"
62+
>
4563
<FaLinkedin />
46-
</LinkedinShareButton>
64+
</a>
4765
</div>
4866
</div>
4967
</div>

0 commit comments

Comments
 (0)