a tool for shared writing and social publishing

filter docs better

+2 -4
+2 -4
app/(home-pages)/home/HomeLayout.tsx
··· 299 299 ({ token: leaflet, archived: archived }) => { 300 300 let published = !!leaflet.leaflets_in_publications?.find((l) => l.doc); 301 301 let drafts = !!leaflet.leaflets_in_publications?.length && !published; 302 - let docs = !leaflet.leaflets_in_publications?.length; 302 + let docs = !leaflet.leaflets_in_publications?.length && !archived; 303 303 let templates = !!allTemplates.find((t) => t.id === leaflet.id); 304 304 // If no filters are active, show all 305 305 if ( ··· 314 314 return ( 315 315 (filter.drafts && drafts) || 316 316 (filter.published && published) || 317 - (filter.docs && 318 - docs && 319 - (archived === false || archived === null || archived || undefined)) || 317 + (filter.docs && docs) || 320 318 (filter.templates && templates) || 321 319 (filter.archived && archived) 322 320 );