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 lastProjects = await getLastProjects(projects.amount);
const size = calculateSizeClasses(projects.amount, lastProjects.length);
---
{ settings.project.enabled && (
{ (settings.project.enabled && lastProjects.length > 0) && (
<div
id={`lastprojects-${projects.id}`}
class="flex lg:flex-col flex-col py-12 px-12 lg:container mx-auto gap-y-8 gap-x-18 w-full"