remove related products fetch from ProductCard

This commit is contained in:
2025-10-10 14:58:55 +02:00
parent 8f803b487e
commit 987c388bff

View File

@@ -57,7 +57,6 @@ export default {
}, },
mounted() { mounted() {
this.productUrl = window.location.origin + `/productos/${this.product.id}` this.productUrl = window.location.origin + `/productos/${this.product.id}`
this.getRelatedProducts()
}, },
methods: { methods: {
@@ -72,21 +71,6 @@ export default {
tagRoute(tag) { tagRoute(tag) {
return `/busqueda?tags=${tag}` return `/busqueda?tags=${tag}`
}, },
async getRelatedProducts() {
try {
const config = useRuntimeConfig()
const data = await $fetch(`/products/${this.product.id}/related/`, {
baseURL: config.public.baseURL,
method: 'GET',
headers: {
Authorization: '/',
},
})
this.relatedProducts = data
} catch {
this.relatedProducts = null
}
},
openUrl(url) { openUrl(url) {
window.open(url) window.open(url)