@@ -19,35 +19,37 @@ const SingleJobPostDetails = (props: any) => {
1919 dispatch ( fetchSingleJobPost ( jobPostId ) ) ;
2020 } , [ jobPostId ] ) ;
2121
22- const clickableText = "Click here to view the job post" ;
23- const shareMessage = `Check out this job opportunity: ${ fetchSingleJobPostStates ?. data ?. title } \n${ clickableText } ` ;
22+ const shareMessage = `Check out this job opportunity: ${ fetchSingleJobPostStates ?. data ?. title } \n${ window . location . href } ` ;
2423
2524 const shareOnTwitterDM = ( ) => {
26- const url = `https://twitter.com/messages/compose?text=${ encodeURIComponent ( shareMessage ) } &url=${ encodeURIComponent ( window . location . href ) } ` ;
25+ const url = `https://twitter.com/messages/compose?text=${ encodeURIComponent (
26+ shareMessage
27+ ) } `;
2728 window . open ( url , "_blank" , "width=600,height=400" ) ;
2829 } ;
2930
3031 const shareOnWhatsApp = ( ) => {
31- const url = `https://api.whatsapp.com/send?text=${ encodeURIComponent ( shareMessage ) } &url=${ encodeURIComponent ( window . location . href ) } ` ;
32+ const url = `https://api.whatsapp.com/send?text=${ encodeURIComponent (
33+ shareMessage
34+ ) } `;
3235 window . open ( url , "_blank" , "width=600,height=400" ) ;
3336 } ;
3437
3538 const shareOnTelegram = ( ) => {
36- const url = `https://t.me/share/url?url=${ encodeURIComponent ( window . location . href ) } &text= ${ encodeURIComponent ( shareMessage ) } ` ;
39+ const url = `https://t.me/share/url?url=${ encodeURIComponent ( window . location . href ) } ` ;
3740 window . open ( url , "_blank" , "width=600,height=400" ) ;
3841 } ;
3942
4043 const shareOnLinkedIn = ( ) => {
41- const url = `https://www.linkedin.com/sharing/share-offsite/?url=${ encodeURIComponent ( window . location . href ) } ` ;
44+ const url = `https://www.linkedin.com/sharing/share-offsite/?url=${ encodeURIComponent (
45+ window . location . href
46+ ) } `;
4247 window . open ( url , "_blank" ) ;
4348 } ;
4449
4550 const shareOnGmail = ( ) => {
4651 const subject = encodeURIComponent ( "Interesting Job Opportunity" ) ;
47- const body = encodeURIComponent (
48- `Check out this job opportunity: ${ fetchSingleJobPostStates ?. data ?. title } \n\n` +
49- `Click here to view the job post: ${ window . location . href } `
50- ) ;
52+ const body = encodeURIComponent ( shareMessage ) ;
5153 const url = `https://mail.google.com/mail/?view=cm&fs=1&to=&su=${ subject } &body=${ body } ` ;
5254 window . open ( url , "_blank" ) ;
5355 }
0 commit comments