Skip to content

Commit

Permalink
fix download link on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Yesmunt committed Jun 8, 2020
1 parent f11d068 commit 1dcf16b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion static/app-strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
2 changes: 2 additions & 0 deletions ui/component/fileDownloadLink/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -58,6 +59,7 @@ function FileDownloadLink(props: Props) {
setDidClickDownloadButton(false);
}
}, [streamingUrl, didClickDownloadButton]);
// @endif

function handleDownload(e) {
setDidClickDownloadButton(true);
Expand Down

0 comments on commit 1dcf16b

Please sign in to comment.