File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/react-renderer-demo/src Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
import IconButton from '@mui/material/IconButton' ;
4
4
import CopyToClipboard from 'react-copy-to-clipboard' ;
5
5
import SvgIcon from '@mui/material/SvgIcon' ;
6
+ import { urlFormatter } from '../../helpers/url-formatter' ;
6
7
7
8
const HashTagSvg = ( props ) => (
8
9
// eslint-disable-next-line max-len
@@ -15,7 +16,7 @@ const HashTagSvg = (props) => (
15
16
) ;
16
17
17
18
const ShareButton = ( { path } ) => (
18
- < CopyToClipboard text = { path } >
19
+ < CopyToClipboard text = { urlFormatter ( path ) } >
19
20
< IconButton size = "medium" >
20
21
< SvgIcon fontSize = "small" viewBox = "0 0 48 48" >
21
22
< HashTagSvg />
Original file line number Diff line number Diff line change
1
+ export const urlFormatter = ( initPath ) => {
2
+ const url = process . env . NEXT_PUBLIC_VERCEL_URL ;
3
+
4
+ return `https://${ url + initPath } ` ;
5
+ } ;
You can’t perform that action at this time.
0 commit comments