diff --git a/.changeset/afraid-mirrors-sleep.md b/.changeset/afraid-mirrors-sleep.md new file mode 100644 index 0000000000..b55d2165c4 --- /dev/null +++ b/.changeset/afraid-mirrors-sleep.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Unify section display condition diff --git a/packages/gitbook/src/components/Header/Header.tsx b/packages/gitbook/src/components/Header/Header.tsx index 7b9bfbf6e9..38529ac070 100644 --- a/packages/gitbook/src/components/Header/Header.tsx +++ b/packages/gitbook/src/components/Header/Header.tsx @@ -23,6 +23,12 @@ export function Header(props: { const { context, withTopHeader, withVariants } = props; const { siteSpace, siteSpaces, sections, customization } = context; + const withSections = Boolean( + sections && + (sections.list.length > 1 || // Show section tabs if there are at least 2 sections or at least 1 section group + sections.list.some((s) => s.object === 'site-section-group')) + ); + return (