@@ -15,12 +15,14 @@ import LoadingIndicator from 'components/LoadingIndicator';
15
15
import YouTubeVideo from 'components/YouTubeVideo' ;
16
16
import moment from 'moment' ;
17
17
import localStorage from 'localStorage' ;
18
- import { config , Link } from 'topcoder-react-utils' ;
19
- import ShareSocial from 'components/challenge-detail/Specification/SideBar/ShareSocial ' ;
18
+ import { config , Link , isomorphy } from 'topcoder-react-utils' ;
19
+ import qs from 'qs ' ;
20
20
// SVGs and assets
21
21
import GestureIcon from 'assets/images/icon-gesture.svg' ;
22
22
import ReadMoreArrow from 'assets/images/read-more-arrow.svg' ;
23
- import qs from 'qs' ;
23
+ import IconFacebook from 'assets/images/icon-facebook.svg' ;
24
+ import IconTwitter from 'assets/images/icon-twitter.svg' ;
25
+ import IconLinkedIn from 'assets/images/icon-linkedIn.svg' ;
24
26
25
27
const htmlToText = require ( 'html-to-text' ) ;
26
28
@@ -104,6 +106,10 @@ export default class Article extends React.Component {
104
106
spaceName, environment, preview,
105
107
} ;
106
108
const { upvotes, downvotes } = this . state || { } ;
109
+ let shareUrl ;
110
+ if ( isomorphy . isClientSide ( ) ) {
111
+ shareUrl = encodeURIComponent ( window . location . href ) ;
112
+ }
107
113
108
114
return (
109
115
< React . Fragment >
@@ -180,7 +186,17 @@ export default class Article extends React.Component {
180
186
</ div >
181
187
< div className = { theme . separator } />
182
188
< h3 className = { theme . label } > share</ h3 >
183
- < ShareSocial />
189
+ < div className = { theme . shareButtons } >
190
+ < a href = { `https://www.linkedin.com/sharing/share-offsite/?url=${ shareUrl } ` } target = "_blank" rel = "noopener noreferrer" >
191
+ < IconLinkedIn />
192
+ </ a >
193
+ < a href = { `https://www.facebook.com/sharer/sharer.php?u=${ shareUrl } &src=share_button` } target = "_blank" rel = "noopener noreferrer" >
194
+ < IconFacebook />
195
+ </ a >
196
+ < a href = { `https://twitter.com/intent/tweet?url=${ shareUrl } ` } target = "_blank" rel = "noopener noreferrer" >
197
+ < IconTwitter />
198
+ </ a >
199
+ </ div >
184
200
< div className = { theme . mobileSeparator } />
185
201
</ div >
186
202
{ /* Content */ }
0 commit comments