diff --git a/packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx b/packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx index bd23fd66a..482f8d29c 100644 --- a/packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx +++ b/packages/gitbook/src/components/SiteSections/SiteSectionTabs.tsx @@ -157,6 +157,11 @@ export function SiteSectionTabs(props: { ? structureItem.url : undefined } + sectionId={ + structureItem.object === 'site-section' + ? structureItem.id + : undefined + } isActive={isActive} title={title} icon={icon ? (icon as IconName) : undefined} @@ -233,10 +238,10 @@ function useNavigationMenuViewportOffset(args: { * A tab representing a section or section group */ const SectionTab = React.forwardRef(function SectionTab( - props: { isActive: boolean; title: string; icon?: IconName; url?: string }, + props: { isActive: boolean; title: string; icon?: IconName; url?: string; sectionId?: string }, ref: React.Ref ) { - const { isActive, title, icon, url, ...rest } = props; + const { isActive, title, icon, url, sectionId, ...rest } = props; const isGroup = url === undefined; return (