added a message "no items found"

This commit is contained in:
Laura Dolibois
2025-06-02 23:32:30 +02:00
parent eb98b13f21
commit 6b55c13583
4 changed files with 14 additions and 3 deletions

View File

@@ -538,9 +538,13 @@ export default function Home() {
</div>
<div className="page-background" ref={containerRef}>
<Box className="cardgrid">
{visibleItems.map((item) => (
<ItemCard key={item.id} item={item} />
))}
{visibleItems.length === 0 ? (
<p className="no-results">{t('noItemsFound')}</p>
) : (
visibleItems.map((item) => (
<ItemCard key={item.id} item={item} />
))
)}
</Box>
{/* Loader für Intersection Observer */}

View File

@@ -142,4 +142,9 @@
display: flex;
justify-content: center;
margin-top: 24px;
}
.no-results {
text-align: center;
font-size: 1rem;
}