We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fffa3c4 commit fc238d5Copy full SHA for fc238d5
app/components/Package/ShareModal.vue
@@ -65,16 +65,8 @@ watch(cardUrl, () => {
65
showAlt.value = false
66
})
67
68
-async function downloadCard() {
69
- const a = document.createElement('a')
70
- a.href = cardUrl.value
71
- a.download = `${props.packageName.replace('/', '-')}-card.png`
72
- document.body.appendChild(a)
73
- try {
74
- a.click()
75
- } finally {
76
- document.body.removeChild(a)
77
- }
+function downloadCard() {
+ downloadFileLink(cardUrl.value, `${props.packageName.replace('/', '-')}-card.png`)
78
showAlt.value = true
79
}
80
0 commit comments