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.",
|
"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",
|
"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%.",
|
"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 [didClickDownloadButton, setDidClickDownloadButton] = useState(false);
|
||||||
const fileName = claim && claim.value && claim.value.source && claim.value.source.name;
|
const fileName = claim && claim.value && claim.value.source && claim.value.source.name;
|
||||||
|
|
||||||
|
// @if TARGET='web'
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (didClickDownloadButton && streamingUrl) {
|
if (didClickDownloadButton && streamingUrl) {
|
||||||
let element = document.createElement('a');
|
let element = document.createElement('a');
|
||||||
|
@ -58,6 +59,7 @@ function FileDownloadLink(props: Props) {
|
||||||
setDidClickDownloadButton(false);
|
setDidClickDownloadButton(false);
|
||||||
}
|
}
|
||||||
}, [streamingUrl, didClickDownloadButton]);
|
}, [streamingUrl, didClickDownloadButton]);
|
||||||
|
// @endif
|
||||||
|
|
||||||
function handleDownload(e) {
|
function handleDownload(e) {
|
||||||
setDidClickDownloadButton(true);
|
setDidClickDownloadButton(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue