fix(templates): don't show section when all items are hidden

This commit is contained in:
Manoah Tervoort
2025-02-21 11:00:09 +01:00
parent cd21860535
commit 8efc243e43
12 changed files with 12 additions and 12 deletions

View File

@ -180,7 +180,7 @@ const Section = <T,>({
summaryKey,
keywordsKey,
}: SectionProps<T>) => {
if (!section.visible || section.items.length === 0) return null;
if (!section.visible || section.items.filter((item) => item.visible).length === 0) return null;
return (
<section id={section.id} className={cn("grid", dateKey !== undefined && "gap-y-4")}>