Skip to content

Commit

Permalink
Hide the created download link.
Browse files Browse the repository at this point in the history
Closes #195.
  • Loading branch information
imolorhe committed Dec 17, 2017
1 parent 0379a44 commit ffcdce4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const downloadJson = (obj, fileName = 'response') => {
const downloadLink = document.createElement('a');
const linkText = document.createTextNode('Download');
downloadLink.appendChild(linkText);
downloadLink.style.display = 'none';
downloadLink.setAttribute('href', dataStr);
downloadLink.setAttribute('download', `${toSnakeCase(fileName)}.json`);
document.body.appendChild(downloadLink);
Expand Down

0 comments on commit ffcdce4

Please sign in to comment.