fix download link on desktop
This commit is contained in:
parent
f11d06817f
commit
1dcf16b0b4
2 changed files with 4 additions and 1 deletions
|
@ -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"
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue