diff --git a/ui/component/claimPreviewTile/view.jsx b/ui/component/claimPreviewTile/view.jsx
index d16a86437..001634e77 100644
--- a/ui/component/claimPreviewTile/view.jsx
+++ b/ui/component/claimPreviewTile/view.jsx
@@ -63,8 +63,6 @@ function ClaimPreviewTile(props: Props) {
onClick: e => e.stopPropagation(),
};
- const [isHovering, setHovering] = React.useState(false);
-
let isChannel;
let isValid = false;
if (uri) {
@@ -91,14 +89,6 @@ function ClaimPreviewTile(props: Props) {
}
}
- function handleOnMouseOver(e) {
- setHovering(true);
- }
-
- function handleOnMouseOut(e) {
- setHovering(false);
- }
-
React.useEffect(() => {
if (isValid && !isResolvingUri && shouldFetch && uri) {
resolveUri(uri);
@@ -158,15 +148,20 @@ function ClaimPreviewTile(props: Props) {
className={classnames('card claim-preview--tile', {
'claim-preview--channel': isChannel,
})}
- onMouseOver={handleOnMouseOver}
- onMouseOut={handleOnMouseOut}
>
{!isChannel && (
-
-
-
+
+ {/* @if TARGET='app' */}
+
+
+
+ {/* @endif */}
+
+
+
+
)}
diff --git a/ui/component/fileDownloadLink/view.jsx b/ui/component/fileDownloadLink/view.jsx
index 20aa07dc8..9159a7db1 100644
--- a/ui/component/fileDownloadLink/view.jsx
+++ b/ui/component/fileDownloadLink/view.jsx
@@ -3,7 +3,6 @@ import * as ICONS from 'constants/icons';
import * as MODALS from 'constants/modal_types';
import React from 'react';
import Button from 'component/button';
-import ToolTip from 'component/common/tooltip';
type Props = {
uri: string,
@@ -18,6 +17,7 @@ type Props = {
download: string => void,
triggerViewEvent: string => void,
costInfo: ?{ cost: string },
+ hideOpenButton: boolean,
};
function FileDownloadLink(props: Props) {
@@ -33,6 +33,7 @@ function FileDownloadLink(props: Props) {
claim,
triggerViewEvent,
costInfo,
+ hideOpenButton = false,
} = props;
const cost = costInfo ? Number(costInfo.cost) : 0;
const isPaidContent = cost > 0;
@@ -40,7 +41,9 @@ function FileDownloadLink(props: Props) {
const fileName = value && value.source && value.source.name;
const downloadUrl = `/$/download/${name}/${claimId}`;
- function handleDownload() {
+ function handleDownload(e) {
+ e.preventDefault();
+
// @if TARGET='app'
download(uri);
// @endif;
@@ -58,36 +61,34 @@ function FileDownloadLink(props: Props) {
const label =
fileInfo && fileInfo.written_bytes > 0 ? progress.toFixed(0) + __('% downloaded') : __('Connecting...');
- return {label};
+ return {label};
}
if (fileInfo && fileInfo.download_path && fileInfo.completed) {
- return (
-
-
+ return hideOpenButton ? null : (
+