Correción url compartir whatsapp #21

Merged
esteban merged 1 commits from shared-news into main 2026-03-10 12:12:30 +00:00
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}`)