use claim url for download link to fix downloading reposts
This commit is contained in:
parent
cd2e211689
commit
7ae8f79299
1 changed files with 6 additions and 3 deletions
|
@ -90,6 +90,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||||
const abandoned = !isResolvingUri && !claim;
|
const abandoned = !isResolvingUri && !claim;
|
||||||
const showPublishLink = abandoned && placeholder === 'publish';
|
const showPublishLink = abandoned && placeholder === 'publish';
|
||||||
const hideActions = type === 'small' || type === 'tooltip';
|
const hideActions = type === 'small' || type === 'tooltip';
|
||||||
|
const canonicalUrl = claim && claim.canonical_url;
|
||||||
|
|
||||||
let isValid = false;
|
let isValid = false;
|
||||||
if (uri) {
|
if (uri) {
|
||||||
|
@ -239,9 +240,11 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||||
<NavLink {...navLinkProps}>
|
<NavLink {...navLinkProps}>
|
||||||
<FileThumbnail thumbnail={thumbnailUrl}>
|
<FileThumbnail thumbnail={thumbnailUrl}>
|
||||||
{/* @if TARGET='app' */}
|
{/* @if TARGET='app' */}
|
||||||
<div className="claim-preview__hover-actions">
|
{claim && (
|
||||||
<FileDownloadLink uri={uri} hideOpenButton hideDownloadStatus />
|
<div className="claim-preview__hover-actions">
|
||||||
</div>
|
<FileDownloadLink uri={canonicalUrl} hideOpenButton hideDownloadStatus />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{/* @endif */}
|
{/* @endif */}
|
||||||
</FileThumbnail>
|
</FileThumbnail>
|
||||||
</NavLink>
|
</NavLink>
|
||||||
|
|
Loading…
Add table
Reference in a new issue