We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6c6968d + 4861a02 commit 89b42a5Copy full SHA for 89b42a5
1 file changed
components/ShareButtons.tsx
@@ -6,8 +6,12 @@ interface ShareButtonsProps {
6
}
7
8
export default function ShareButtons({ url, title = '' }: ShareButtonsProps) {
9
- const linkedinUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`;
10
- const twitterUrl = `https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(title)}`;
+ const linkedinUrl = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(
+ url
11
+ )}`;
12
+ const twitterUrl =
13
+ `https://x.com/intent/tweet?url=${encodeURIComponent(url)}` +
14
+ (title ? `&text=${encodeURIComponent(title)}` : '');
15
16
return (
17
<div className="flex gap-3">
0 commit comments