Consistently show variant selector in section bar if site has sections (#3349)

This commit is contained in:
Zeno Kapitein
2025-06-18 17:48:49 +02:00
committed by GitHub
parent 73e0cbb2d6
commit dae019c115
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Consistently show variant selector in section bar if site has sections
@@ -202,7 +202,7 @@ export function Header(props: { context: GitBookSiteContext; withTopHeader?: boo
{siteSpaces.length > 1 && (
<div
id="variants"
className="my-2 mr-5 page-no-toc:flex hidden grow border-tint border-r pr-5 *:grow only:mr-0 only:border-none only:pr-0 sm:max-w-64"
className="my-2 mr-5 grow border-tint border-r pr-5 *:grow only:mr-0 only:border-none only:pr-0 sm:max-w-64"
>
<SpacesDropdown
context={context}
@@ -125,7 +125,7 @@ export function SpaceLayout(props: {
sections={encodeClientSiteSections(context, sections)}
/>
)}
{isMultiVariants && (
{isMultiVariants && !sections && (
<SpacesDropdown
context={context}
siteSpace={siteSpace}