Also add RSS Url

This commit is contained in:
Rafael 2022-05-13 14:05:04 -03:00 committed by Thomas Zarebczan
parent 7c68fd1e61
commit 75df2a5f13

View file

@ -10,7 +10,13 @@ import { generateDownloadUrl, generateNewestUrl } from 'util/web';
import { useIsMobile } from 'effects/use-screensize';
import { FormField } from 'component/common/form';
import { hmsToSeconds, secondsToHms } from 'util/time';
import { generateLbryContentUrl, generateLbryWebUrl, generateEncodedLbryURL, generateShareUrl } from 'util/url';
import {
generateLbryContentUrl,
generateLbryWebUrl,
generateEncodedLbryURL,
generateShareUrl,
generateRssUrl,
} from 'util/url';
import { URL, TWITTER_ACCOUNT, SHARE_DOMAIN_URL } from 'config';
const SHARE_DOMAIN = SHARE_DOMAIN_URL || URL;
@ -78,6 +84,7 @@ function SocialShare(props: Props) {
const rewardsApproved = user && user.is_reward_approved;
const lbryUrl: string = generateLbryContentUrl(canonicalUrl, permanentUrl);
const lbryWebUrl: string = generateLbryWebUrl(lbryUrl);
const rssUrl = isChannel && generateRssUrl(SHARE_DOMAIN, claim);
const includedCollectionId = collectionId && includeCollectionId ? collectionId : null;
const encodedLbryURL: string = generateEncodedLbryURL(
SHARE_DOMAIN,
@ -239,6 +246,7 @@ function SocialShare(props: Props) {
{showClaimLinks && (
<div className="section">
{Boolean(isStream) && <CopyableText label={__('Download Link')} copyable={downloadUrl} />}
{Boolean(rssUrl) && <CopyableText label={__('RSS Url')} copyable={rssUrl} />}
{Boolean(isChannel) && (
<>
<CopyableText label={__('Latest Content Link')} copyable={generateNewestUrl(name, PAGES.LATEST)} />