Correción url compartir whatsapp
This commit is contained in:
parent
22234a40b4
commit
4fcfb94ae7
|
|
@ -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}`)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue