fix download link on desktop

This commit is contained in:
Sean Yesmunt 2020-06-08 16:26:49 -04:00
parent f11d06817f
commit 1dcf16b0b4
2 changed files with 4 additions and 1 deletions

View file

@ -1210,5 +1210,6 @@
"Only some countries are eligible at this time. We are working to make this available to everyone.": "Only some countries are eligible at this time. We are working to make this available to everyone.",
"Select your country": "Select your country",
"LBRY, Inc. partners with Moonpay to provide the option to purchase LBC. %learn_more%.": "LBRY, Inc. partners with Moonpay to provide the option to purchase LBC. %learn_more%.",
"Your browser does not support iframes.": "Your browser does not support iframes."
"Your browser does not support iframes.": "Your browser does not support iframes.",
"Change Inviter": "Change Inviter"
}

View file

@ -43,6 +43,7 @@ function FileDownloadLink(props: Props) {
const [didClickDownloadButton, setDidClickDownloadButton] = useState(false);
const fileName = claim && claim.value && claim.value.source && claim.value.source.name;
// @if TARGET='web'
React.useEffect(() => {
if (didClickDownloadButton && streamingUrl) {
let element = document.createElement('a');
@ -58,6 +59,7 @@ function FileDownloadLink(props: Props) {
setDidClickDownloadButton(false);
}
}, [streamingUrl, didClickDownloadButton]);
// @endif
function handleDownload(e) {
setDidClickDownloadButton(true);