File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
packages/app/src/app/pages/common/Modals/ShareModal Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { inject, observer } from 'mobx-react';
33import Files from 'embed/components/Files' ;
44import QRCode from 'qrcode.react' ;
55import track from '@codesandbox/common/lib/utils/analytics' ;
6+ import { Button } from '@codesandbox/common/lib/components/Button' ;
67import { sandboxUrl } from '@codesandbox/common/lib/utils/url-generator' ;
78import Title from './Title' ;
89
@@ -292,6 +293,35 @@ class ShareView extends React.Component {
292293 />
293294 </ Inputs >
294295 </ Title >
296+ < Title title = "Share on Social Media" >
297+ < Inputs
298+ style = { {
299+ margin : '20px 0' ,
300+ } }
301+ >
302+ < Button
303+ small
304+ target = "_blank"
305+ href = { `https://dev.to/new?prefill=---%5Cn%20title:${ encodeURIComponent (
306+ sandbox . title || sandbox . id
307+ ) } %5Cn%20published:%20false%5Cn%20tags:%20codesandbox%5Cn%20---%5Cn%20%5Cn%20%5Cn%20%5Cn%20%7B%25%20codesandbox%20${ encodeURIComponent (
308+ sandbox . id
309+ ) } %20%25%7D`}
310+ >
311+ Share on DEV
312+ </ Button >
313+ < Button
314+ style = { { marginLeft : '1em' } }
315+ small
316+ target = "_blank"
317+ href = { `https://twitter.com/intent/tweet?text=${ encodeURIComponent (
318+ sandbox . title || sandbox . id
319+ ) } .+${ getEditorUrl ( sandbox , mainModule , this . state ) } `}
320+ >
321+ Share on Twitter
322+ </ Button >
323+ </ Inputs >
324+ </ Title >
295325 </ section >
296326 </ Wrapper >
297327 </ ShareOptions >
You can’t perform that action at this time.
0 commit comments