Compare commits
No commits in common. "f6ef73988eb1e3b30f906b5900d3434149e644a5" and "22234a40b4f4c23296b8c8654101079a8a48b613" have entirely different histories.
f6ef73988e
...
22234a40b4
|
|
@ -98,7 +98,15 @@ const copyLink = async () => {
|
||||||
console.error("No se pudo copiar")
|
console.error("No se pudo copiar")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fullUrl = computed(() => window.location.href)
|
const BASE_URL = window.location.host
|
||||||
|
|
||||||
|
const fullUrl = computed(() => {
|
||||||
|
if (props.url.startsWith("http")) {
|
||||||
|
const url = new URL(props.url)
|
||||||
|
return `${BASE_URL}${url.pathname}`
|
||||||
|
}
|
||||||
|
return `${BASE_URL}${props.url}`
|
||||||
|
})
|
||||||
|
|
||||||
const encodedUrl = computed(() => encodeURIComponent(fullUrl.value))
|
const encodedUrl = computed(() => encodeURIComponent(fullUrl.value))
|
||||||
const twitterUrl = computed(() => `https://twitter.com/intent/tweet?url=${encodedUrl.value}`)
|
const twitterUrl = computed(() => `https://twitter.com/intent/tweet?url=${encodedUrl.value}`)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue