Skip to content

Commit 5f1e8e0

Browse files
fix social media share buttons with proper react-share props
Signed-off-by: Rajesh-Nagarajan-11 <[email protected]>
1 parent 4dccdc5 commit 5f1e8e0

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

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

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,15 @@ const AboutTheAuthor = (props) => {
3535
<div className="share-section">
3636
<h3>Share</h3>
3737
<div className="share-icons-container">
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-
>
38+
<TwitterShareButton url={location.href} title={shareQuote || "Check out this article!"} className="icon">
4539
<AiOutlineTwitter />
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-
>
40+
</TwitterShareButton>
41+
<FacebookShareButton url={location.href} quote={shareQuote || "Check out this article!"} className="icon">
5442
<FaFacebookF />
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-
>
43+
</FacebookShareButton>
44+
<LinkedinShareButton url={location.href} title={shareQuote || "Check out this article!"} className="icon">
6345
<FaLinkedin />
64-
</a>
46+
</LinkedinShareButton>
6547
</div>
6648
</div>
6749
</div>

0 commit comments

Comments
 (0)