@@ -24,8 +24,7 @@ import { analytics } from '@/utils';
2424import styles from './SocialShare.module.scss' ;
2525
2626interface Props {
27- summary ?: string ;
28- title : string ;
27+ text : string ;
2928 url : string | null ;
3029 className ?: string ;
3130 socialNetworks : ThemeSettings [ 'sharing_actions' ] ;
@@ -36,13 +35,12 @@ interface Props {
3635}
3736
3837export function SocialShare ( {
38+ text,
39+ url,
3940 className,
4041 socialNetworks,
41- summary,
4242 thumbnailUrl,
43- title,
4443 trackingContext,
45- url,
4644 withLabels,
4745 uuid,
4846} : Props ) {
@@ -85,7 +83,7 @@ export function SocialShare({
8583 className = { styles . socialLink }
8684 href = { createUrlWithQuery ( 'https://www.linkedin.com/sharing/share-offsite' , {
8785 url,
88- text : [ title , summary , url ] . filter ( Boolean ) . join ( '\n\n' ) ,
86+ text,
8987 } ) }
9088 onClick = { ( ) => trackSharingEvent ( SocialNetwork . LINKEDIN ) }
9189 rel = "noopener noreferrer"
@@ -116,7 +114,7 @@ export function SocialShare({
116114 className = { styles . socialLink }
117115 href = { createUrlWithQuery ( 'https://twitter.com/intent/tweet' , {
118116 url,
119- text : title ,
117+ text,
120118 } ) }
121119 onClick = { ( ) => trackSharingEvent ( SocialNetwork . TWITTER ) }
122120 rel = "noopener noreferrer"
@@ -131,7 +129,7 @@ export function SocialShare({
131129 aria-label = { generateAriaLabel ( SocialNetwork . MASTODON ) }
132130 className = { styles . socialLink }
133131 href = { createUrlWithQuery ( 'https://mastodon.social/share' , {
134- text : [ title , summary , url ] . filter ( Boolean ) . join ( ' \n\n' ) ,
132+ text : ` ${ text } \n\n${ url } ` ,
135133 } ) }
136134 onClick = { ( ) => trackSharingEvent ( SocialNetwork . MASTODON ) }
137135 rel = "noopener noreferrer"
@@ -148,7 +146,7 @@ export function SocialShare({
148146 href = { createUrlWithQuery ( 'https://pinterest.com/pin/create/button/' , {
149147 url,
150148 media : thumbnailUrl ,
151- description : [ title , summary ] . filter ( Boolean ) . join ( ' ' ) ,
149+ description : text ,
152150 } ) }
153151 onClick = { ( ) => trackSharingEvent ( SocialNetwork . PINTEREST ) }
154152 rel = "noopener noreferrer"
@@ -162,7 +160,7 @@ export function SocialShare({
162160 < a
163161 aria-label = { generateAriaLabel ( SocialNetwork . REDDIT ) }
164162 className = { styles . socialLink }
165- href = { createUrlWithQuery ( 'https://www.reddit.com/submit' , { title, url } ) }
163+ href = { createUrlWithQuery ( 'https://www.reddit.com/submit' , { title : text , url } ) }
166164 onClick = { ( ) => trackSharingEvent ( SocialNetwork . REDDIT ) }
167165 rel = "noopener noreferrer"
168166 target = "_blank"
@@ -182,7 +180,7 @@ export function SocialShare({
182180 aria-label = { generateAriaLabel ( SocialNetwork . WHATSAPP ) }
183181 className = { styles . socialLink }
184182 href = { createUrlWithQuery ( 'https://api.whatsapp.com/send' , {
185- text : `${ title } ${ url } ` ,
183+ text : `${ text } ${ url } ` ,
186184 } ) }
187185 onClick = { ( ) => trackSharingEvent ( SocialNetwork . WHATSAPP ) }
188186 rel = "noopener noreferrer"
@@ -197,7 +195,7 @@ export function SocialShare({
197195 aria-label = { generateAriaLabel ( SocialNetwork . THREADS ) }
198196 className = { styles . socialLink }
199197 href = { createUrlWithQuery ( 'https://www.threads.net/intent/post' , {
200- text : `${ title } ${ url } ` ,
198+ text : `${ text } ${ url } ` ,
201199 } ) }
202200 onClick = { ( ) => trackSharingEvent ( SocialNetwork . THREADS ) }
203201 rel = "noopener noreferrer"
@@ -213,7 +211,7 @@ export function SocialShare({
213211 className = { styles . socialLink }
214212 href = { createUrlWithQuery ( 'https://t.me/share/url' , {
215213 url,
216- text : title ,
214+ text,
217215 } ) }
218216 onClick = { ( ) => trackSharingEvent ( SocialNetwork . TELEGRAM ) }
219217 rel = "noopener noreferrer"
@@ -228,7 +226,7 @@ export function SocialShare({
228226 aria-label = { generateAriaLabel ( SocialNetwork . BLUESKY ) }
229227 className = { styles . socialLink }
230228 href = { createUrlWithQuery ( 'https://bsky.app/intent/compose' , {
231- text : `${ title } ${ url } ` ,
229+ text : `${ text } ${ url } ` ,
232230 } ) }
233231 onClick = { ( ) => trackSharingEvent ( SocialNetwork . BLUESKY ) }
234232 rel = "noopener noreferrer"
0 commit comments