Skip to content

Commit 4b8a621

Browse files
authored
Show sections tabs only if there is at least two sections (#3158)
1 parent e44e947 commit 4b8a621

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/dirty-mangos-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"gitbook": patch
3+
---
4+
5+
Show sections tabs only if there is at least two sections

packages/gitbook/src/components/Header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
215215
/>
216216
</div>
217217
)}
218-
{sections && (
218+
{sections && sections.list.length > 1 && (
219219
<SiteSectionTabs
220220
sections={encodeClientSiteSections(context, sections)}
221221
/>

0 commit comments

Comments
 (0)