remove related products fetch from ProductCard
This commit is contained in:
@@ -57,7 +57,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.productUrl = window.location.origin + `/productos/${this.product.id}`
|
||||
this.getRelatedProducts()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -72,21 +71,6 @@ export default {
|
||||
tagRoute(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) {
|
||||
window.open(url)
|
||||
|
||||
Reference in New Issue
Block a user