feat: add console logging for image loading and product data fetching in Product and ProductDetailPage components for improved debugging
This commit is contained in:
@@ -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' }));
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user