clean up links

This commit is contained in:
Sean Yesmunt 2020-03-30 09:14:01 -04:00
parent 8c8989bc03
commit dbdef22f46
2 changed files with 6 additions and 6 deletions

View file

@ -48,12 +48,12 @@ class SocialShare extends React.PureComponent<Props, State> {
const lbryWebUrl = lbryUrl.replace(/#/g, ':');
const encodedLbryURL: string = `${OPEN_URL}${encodeURIComponent(lbryWebUrl)}`;
const referralParam: string = referralCode && rewardsApproved ? `?r=${referralCode}` : '';
const lbryURL: string = `${OPEN_URL}${lbryWebUrl}${referralParam}`;
const downloadUrl = `${OPEN_URL}${generateDownloadUrl(name, claimId)}`;
const openDotLbryDotComUrl: string = `${OPEN_URL}${lbryWebUrl}${referralParam}`;
const downloadUrl = `${generateDownloadUrl(name, claimId)}`;
return (
<React.Fragment>
<CopyableText label={__('LBRY Link')} copyable={lbryURL} />
<CopyableText label={__('LBRY Link')} copyable={openDotLbryDotComUrl} />
<div className="section__actions">
<Button
className="share"
@ -114,8 +114,8 @@ class SocialShare extends React.PureComponent<Props, State> {
{showEmbed && <EmbedTextArea label={__('Embedded')} claim={claim} />}
{showExtra && (
<div className="section">
<CopyableText label={__('LBRY URL')} copyable={lbryUrl} />
<CopyableText label={__('Download')} copyable={downloadUrl} />
<CopyableText label={__('LBRY URL')} copyable={`lbry://${lbryUrl}`} />
<CopyableText label={__('Download Link')} copyable={downloadUrl} />
</div>
)}
</React.Fragment>

View file

@ -35,7 +35,7 @@ function generateEmbedUrl(claimName, claimId) {
}
function generateDownloadUrl(claimName, claimId) {
return `/$/download/${claimName}/${claimId}`;
return `${URL}/$/download/${claimName}/${claimId}`;
}
function generateDirectUrl(claimName, claimId) {