From e31333a432c483221df2a88f242bf6cc94a3eb55 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Tue, 25 Nov 2025 13:10:55 -0500 Subject: [PATCH] filter docs better --- app/(home-pages)/home/HomeLayout.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/(home-pages)/home/HomeLayout.tsx b/app/(home-pages)/home/HomeLayout.tsx index d2764987..fcd5f6e9 100644 --- a/app/(home-pages)/home/HomeLayout.tsx +++ b/app/(home-pages)/home/HomeLayout.tsx @@ -299,7 +299,7 @@ function useSearchedLeaflets( ({ token: leaflet, archived: archived }) => { let published = !!leaflet.leaflets_in_publications?.find((l) => l.doc); let drafts = !!leaflet.leaflets_in_publications?.length && !published; - let docs = !leaflet.leaflets_in_publications?.length; + let docs = !leaflet.leaflets_in_publications?.length && !archived; let templates = !!allTemplates.find((t) => t.id === leaflet.id); // If no filters are active, show all if ( @@ -314,9 +314,7 @@ function useSearchedLeaflets( return ( (filter.drafts && drafts) || (filter.published && published) || - (filter.docs && - docs && - (archived === false || archived === null || archived || undefined)) || + (filter.docs && docs) || (filter.templates && templates) || (filter.archived && archived) ); -- 2.51.2