Correción url compartir whatsapp

This commit is contained in:
David Ascanio 2026-03-09 00:37:48 -03:00
parent 22234a40b4
commit 4fcfb94ae7
1 changed files with 1 additions and 9 deletions

View File

@ -98,15 +98,7 @@ const copyLink = async () => {
console.error("No se pudo copiar")
}
}
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 fullUrl = computed(() => window.location.href)
const encodedUrl = computed(() => encodeURIComponent(fullUrl.value))
const twitterUrl = computed(() => `https://twitter.com/intent/tweet?url=${encodedUrl.value}`)