@@ -10,6 +10,7 @@ import { isCurrentPage } from '../../utils/is-current-page';
1010import { theme } from '../../theme/docsTheme' ;
1111import { isUnifiedTOCInDevMode } from '../../utils/is-unified-toc-dev' ;
1212import { VersionContext } from '../../context/version-context' ;
13+ import { tocItemKey } from '../../utils/create-toc-key' ;
1314import { l1ItemStyling , groupHeaderStyling , l2ItemStyling } from './styles/SideNavItem' ;
1415import { UnifiedVersionDropdown } from './UnifiedVersionDropdown' ;
1516import { TocItem } from './types' ;
@@ -113,7 +114,7 @@ export const UnifiedTocNavItem = ({
113114 < UnifiedTocNavItem
114115 { ...tocItem }
115116 level = { level }
116- key = { tocItem . newUrl + tocItem . label }
117+ key = { tocItemKey ( tocItem ) }
117118 slug = { slug }
118119 isStatic = { false }
119120 isAccordion = { isAccordion }
@@ -134,7 +135,7 @@ export const UnifiedTocNavItem = ({
134135 < UnifiedTocNavItem
135136 { ...tocItem }
136137 level = { level }
137- key = { tocItem . newUrl + tocItem . label }
138+ key = { tocItemKey ( tocItem ) }
138139 slug = { slug }
139140 isStatic = { false }
140141 isAccordion = { isAccordion }
@@ -157,7 +158,7 @@ export const UnifiedTocNavItem = ({
157158 < UnifiedTocNavItem
158159 { ...tocItem }
159160 level = { level }
160- key = { tocItem . newUrl + tocItem . label }
161+ key = { tocItemKey ( tocItem ) }
161162 slug = { slug }
162163 isAccordion = { isAccordion }
163164 setCurrentL2s = { setCurrentL2s }
@@ -308,7 +309,7 @@ export const CollapsibleNavItem = ({
308309 < UnifiedTocNavItem
309310 { ...item }
310311 level = { level + 1 }
311- key = { item . newUrl + item . label }
312+ key = { tocItemKey ( item ) }
312313 slug = { slug }
313314 setShowDriverBackBtn = { setShowDriverBackBtn }
314315 setCurrentL2s = { setCurrentL2s }
0 commit comments