File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,10 @@ export function PageContent(props: PageContentProps) {
8787 } }
8888 >
8989 { dynamicMdContent . map ( ( section , index ) => (
90- < Fragment key = { index } >
90+ < Fragment key = { section . id } >
9191 < div
9292 className = "min-w-1/2 max-w-200 text-justify"
93- id = { ` ${ index } ` } // 目次からaタグで飛ぶために必要
93+ id = { section . id } // 目次からaタグで飛ぶために必要
9494 ref = { ( el ) => {
9595 sectionRefs . current [ index ] = el ;
9696 } }
Original file line number Diff line number Diff line change @@ -195,11 +195,11 @@ export function Sidebar({ pagesList }: { pagesList: LanguageEntry[] }) {
195195 idx + 1 === currentSectionIndex ;
196196 return (
197197 < li
198- key = { idx }
198+ key = { section . id }
199199 style = { { marginLeft : section . level - 2 + "em" } }
200200 >
201201 < Link
202- href = { `#${ idx + 1 } ` }
202+ href = { `#${ section . id } ` }
203203 className = {
204204 isCurrentSection ? "font-bold" : ""
205205 }
You can’t perform that action at this time.
0 commit comments