Copy Link: use canonical

## Issue
6497
This commit is contained in:
infinite-persistence 2021-07-16 10:17:48 +08:00
parent 6bee1915ec
commit 73c872501c
No known key found for this signature in database
GPG key ID: B9C3252EDC3D0AA0

View file

@ -7,7 +7,7 @@ import React from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button'; import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button';
import Icon from 'component/common/icon'; import Icon from 'component/common/icon';
import { generateShareUrl, generateRssUrl } from 'util/url'; import { generateShareUrl, generateRssUrl, generateLbryContentUrl } from 'util/url';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux'; import { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux';
@ -107,7 +107,8 @@ function ClaimMenuList(props: Props) {
return null; return null;
} }
const shareUrl: string = generateShareUrl(SHARE_DOMAIN, uri); const lbryUrl: string = generateLbryContentUrl(claim.canonical_url, claim.permanent_url);
const shareUrl: string = generateShareUrl(SHARE_DOMAIN, lbryUrl);
const rssUrl: string = isChannel ? generateRssUrl(URL, claim) : ''; const rssUrl: string = isChannel ? generateRssUrl(URL, claim) : '';
const isCollectionClaim = claim && claim.value_type === 'collection'; const isCollectionClaim = claim && claim.value_type === 'collection';
// $FlowFixMe // $FlowFixMe