@@ -55,7 +55,7 @@ const CourseOverview = ({ course, chapters, serviceMeshesList, children }) => {
5555
5656 useEffect ( ( ) => {
5757 let bookmarkPath = localStorage . getItem ( "bookmarkpath-" + course . fields . slug . split ( "/" ) [ 3 ] ) ;
58- if ( bookmarkPath ) {
58+ if ( bookmarkPath ) {
5959 setHasBookmark ( true ) ;
6060 setBookmarkUrl ( bookmarkPath ) ;
6161 }
@@ -93,7 +93,7 @@ const CourseOverview = ({ course, chapters, serviceMeshesList, children }) => {
9393 { hasBookmark && (
9494 < Button
9595 className = "start-again-button"
96- $primary title = "Resume"
96+ $primary title = "Resume"
9797 $url = { bookmarkUrl }
9898 />
9999 ) }
@@ -113,20 +113,27 @@ const CourseOverview = ({ course, chapters, serviceMeshesList, children }) => {
113113 { children }
114114 </ SRLWrapper >
115115 < h2 className = "course-toc" > Table Of Contents</ h2 >
116- { course . frontmatter . toc . map ( ( item , index ) => (
117- < Link key = { index } to = { `${ extractedSection } /${ item } ` } className = "chapter-link" >
118- < ChapterCard
119- chapterNum = { index + 1 }
120- chapter = { getChapterTitle ( item , chapters ) }
121- />
122- </ Link >
123- ) ) }
116+ { course . frontmatter . toc . map ( ( item , index ) => {
117+ const chapterNode = getChapterTitle ( item , chapters ) ;
118+ return (
119+ < Link
120+ key = { index }
121+ to = { chapterNode ? `/${ chapterNode . fields . slug } ` : "#" }
122+ className = "chapter-link"
123+ >
124+ < ChapterCard
125+ chapterNum = { index + 1 }
126+ chapter = { chapterNode }
127+ />
128+ </ Link >
129+ ) ;
130+ } ) }
124131 </ Col >
125132 < Col $md = { 12 } $lg = { 4 } $xl = { 5 } >
126133 < div className = "service-meshes-you-can-learn" >
127- { console . log ( "lenght of the service mesh array: " , availableServiceMeshes . length ) }
128- { console . log ( "array: " , availableServiceMeshes ) }
129- { serviceMeshImages . length !== 0 && availableServiceMeshes . length != 0 && (
134+ { console . log ( "lenght of the service mesh array: " , availableServiceMeshes . length ) }
135+ { console . log ( "array: " , availableServiceMeshes ) }
136+ { serviceMeshImages . length !== 0 && availableServiceMeshes . length != 0 && (
130137 < >
131138 < h2 > Technologies You Can Learn</ h2 >
132139 < ServiceMeshesAvailable serviceMeshes = { availableServiceMeshes } />
0 commit comments