feat: add console logging for image loading and product data fetching in Product and ProductDetailPage components for improved debugging

This commit is contained in:
sebseb7
2025-07-23 08:41:26 +02:00
parent 602324b1fe
commit 1c777f8daa
2 changed files with 5 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ class Product extends Component {
loadImage = (bildId) => {
console.log('loadImagevisSocket', bildId);
window.socketManager.emit('getPic', { bildId, size:'small' }, (res) => {
if(res.success){
window.smallPicCache[bildId] = URL.createObjectURL(new Blob([res.imageBuffer], { type: 'image/jpeg' }));

View File

@@ -133,6 +133,7 @@ class ProductDetailPage extends Component {
}
// Fetch image from server
console.log('loadKomponentImage', bildId);
window.socketManager.emit('getPic', { bildId, size: 'small' }, (res) => {
if (res.success) {
// Cache the image
@@ -227,6 +228,7 @@ class ProductDetailPage extends Component {
}
}));
console.log('loadKomponent', id, count);
window.socketManager.emit(
"getProductView",
{ articleId: id },
@@ -338,7 +340,7 @@ class ProductDetailPage extends Component {
}
loadProductData = () => {
console.log('loadProductData', this.props.seoName);
window.socketManager.emit(
"getProductView",
{ seoName: this.props.seoName },
@@ -408,7 +410,7 @@ class ProductDetailPage extends Component {
}
} else {
// Not in cache, fetch from server
console.log('getAttributePicture', cacheKey);
window.socketManager.emit(
"getAttributePicture",
{ id: cacheKey },