Compare commits

..

2 Commits

Author SHA1 Message Date
Esteban Paz f6ef73988e Merge pull request 'Correción url compartir whatsapp' (#21) from shared-news into main
Reviewed-on: #21
2026-03-10 12:12:29 +00:00
David Ascanio 4fcfb94ae7 Correción url compartir whatsapp 2026-03-09 00:37:48 -03: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") console.error("No se pudo copiar")
} }
} }
const BASE_URL = window.location.host const fullUrl = computed(() => window.location.href)
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}`)