This commit is contained in:
Tizian.Breuch
2025-10-21 09:53:58 +02:00
parent ef994b89e3
commit 0fd834089a
2 changed files with 3 additions and 3 deletions

View File

@@ -274,9 +274,9 @@ export class ProductListComponent implements OnInit, OnDestroy {
*/
getMainImageUrl(images?: ProductImage[]): string {
if (!images || images.length === 0) {
return 'https://via.placeholder.com/50'; // Platzhalter, wenn gar keine Bilder vorhanden sind
return ''; // Platzhalter, wenn gar keine Bilder vorhanden sind
}
const mainImage = images.find(img => img.isMainImage);
return mainImage?.url || images[0].url || 'https://via.placeholder.com/50'; // Fallback auf das erste Bild, wenn kein Hauptbild markiert ist
return mainImage?.url || images[0].url || ''; // Fallback auf das erste Bild, wenn kein Hauptbild markiert ist
}
}

View File

@@ -1,6 +1,6 @@
<header class="main-header">
<div class="header-left">
logo
logo - 1
</div>
<div class="header-actions">