@@ -77,29 +77,30 @@ export const ReferenceDirectoryWithFilter = ({
7777 } , [ ] ) ;
7878 } , [ categoryData , searchKeyword ] ) ;
7979
80- const renderEntries = ( entries : ReferenceDirectoryEntry [ ] ) => (
81- < div class = "content-grid" >
82- { entries . map ( ( entry ) => (
83- < div class = "col-span-3 w-full overflow-hidden" key = { entry . id } >
84- < a
85- href = { `/reference/${ entry . data . path } ` }
86- class = "group hover:no-underline"
87- aria-label = { entry . data . title }
88- aria-describedby = { `${ entry . data . title } -description` }
89- >
90- < span
91- class = "text-body-mono group-hover:underline"
92- dangerouslySetInnerHTML = { { __html : entry . data . title } }
93- />
94- < p
95- class = "mt-1 text-sm"
96- id = { `${ entry . data . title } -description` }
97- > { `${ getOneLineDescription ( entry . data . description ) } ` } </ p >
98- </ a >
99- </ div >
100- ) ) }
101- </ div >
102- ) ;
80+ const renderEntries = ( entries : ReferenceDirectoryEntry [ ] ) =>
81+ entries . length === 0 ? null : (
82+ < div class = "content-grid" >
83+ { entries . map ( ( entry ) => (
84+ < div class = "col-span-3 w-full overflow-hidden" key = { entry . id } >
85+ < a
86+ href = { `/reference/${ entry . data . path } ` }
87+ class = "group hover:no-underline"
88+ aria-label = { entry . data . title }
89+ aria-describedby = { `${ entry . data . title } -description` }
90+ >
91+ < span
92+ class = "text-body-mono group-hover:underline"
93+ dangerouslySetInnerHTML = { { __html : entry . data . title } }
94+ />
95+ < p
96+ class = "mt-1 text-sm"
97+ id = { `${ entry . data . title } -description` }
98+ > { `${ getOneLineDescription ( entry . data . description ) } ` } </ p >
99+ </ a >
100+ </ div >
101+ ) ) }
102+ </ div >
103+ ) ;
103104
104105 const getSubcatHeading = (
105106 subcat : { name : string } ,
0 commit comments