use claim url for download link to fix downloading reposts

This commit is contained in:
Sean Yesmunt 2020-02-05 13:08:37 -05:00
parent cd2e211689
commit 7ae8f79299

View file

@ -90,6 +90,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
const abandoned = !isResolvingUri && !claim;
const showPublishLink = abandoned && placeholder === 'publish';
const hideActions = type === 'small' || type === 'tooltip';
const canonicalUrl = claim && claim.canonical_url;
let isValid = false;
if (uri) {
@ -239,9 +240,11 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
<NavLink {...navLinkProps}>
<FileThumbnail thumbnail={thumbnailUrl}>
{/* @if TARGET='app' */}
<div className="claim-preview__hover-actions">
<FileDownloadLink uri={uri} hideOpenButton hideDownloadStatus />
</div>
{claim && (
<div className="claim-preview__hover-actions">
<FileDownloadLink uri={canonicalUrl} hideOpenButton hideDownloadStatus />
</div>
)}
{/* @endif */}
</FileThumbnail>
</NavLink>