1717import React , { useEffect , useRef } from "react" ;
1818import { TocItem } from "../../structure/TocItem" ;
1919import { documentationNavigation } from "../../structure/DocumentationNavigation" ;
20- import { isTocItemIndex } from "../../structure/toc/TableOfContents" ;
2120
2221import "./DocStatsView.css" ;
2322
@@ -59,9 +58,7 @@ function collectTocPageIds(toc: TocItem[]): Set<string> {
5958 const pageIds = new Set < string > ( ) ;
6059 for ( const chapter of toc ) {
6160 for ( const item of chapter . items || [ ] ) {
62- if ( ! isTocItemIndex ( item ) ) {
63- pageIds . add ( buildPageId ( item . dirName , item . fileName ) ) ;
64- }
61+ pageIds . add ( buildPageId ( item . dirName , item . fileName ) ) ;
6562 }
6663 }
6764 return pageIds ;
@@ -119,7 +116,7 @@ function PageItem({ item, stats }: PageItemProps) {
119116 return (
120117 < div className = "znai-doc-stats-page-item" >
121118 < a href = { href } className = "znai-doc-stats-page-link" >
122- { item . pageTitle }
119+ { item . pageTitle || item . fileName }
123120 </ a >
124121 < StatsCounters stats = { stats ?? ZERO_STATS } />
125122 </ div >
@@ -133,7 +130,7 @@ interface ChapterSectionProps {
133130}
134131
135132function ChapterSection ( { chapter, chapterStats, pageStats } : ChapterSectionProps ) {
136- const items = ( chapter . items || [ ] ) . filter ( ( item ) => ! isTocItemIndex ( item ) ) ;
133+ const items = chapter . items || [ ] ;
137134
138135 if ( items . length === 0 ) {
139136 return null ;
0 commit comments