Only render the last components if there is anything to show, otherwise just show nothing

This commit is contained in:
itsfinniii
2026-04-12 18:23:07 +02:00
parent 3485c4583d
commit 8bc95d0f50
3 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ const lastAlbums = await getLastAlbums(albums.amount);
const size = calculateSizeClasses(albums.amount, lastAlbums.length);
---
{ settings.photo.enabled && (
{ (settings.photo.enabled && lastAlbums.length > 0) && (
<div
id={`lastalbums-${albums.id}`}
class="flex lg:flex-col flex-col py-12 px-12 lg:container mx-auto gap-y-8 gap-x-18 w-full"