From 73c872501c8fb0a36c3f38273f3e583cf3ee9e55 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Fri, 16 Jul 2021 10:17:48 +0800 Subject: [PATCH] Copy Link: use canonical ## Issue 6497 --- ui/component/claimMenuList/view.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/component/claimMenuList/view.jsx b/ui/component/claimMenuList/view.jsx index df7925e82..204181e4f 100644 --- a/ui/component/claimMenuList/view.jsx +++ b/ui/component/claimMenuList/view.jsx @@ -7,7 +7,7 @@ import React from 'react'; import classnames from 'classnames'; import { Menu, MenuButton, MenuList, MenuItem } from '@reach/menu-button'; 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 { buildURI, parseURI, COLLECTIONS_CONSTS } from 'lbry-redux'; @@ -107,7 +107,8 @@ function ClaimMenuList(props: Props) { 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 isCollectionClaim = claim && claim.value_type === 'collection'; // $FlowFixMe