diff --git a/packages/gitbook/src/components/Header/Header.tsx b/packages/gitbook/src/components/Header/Header.tsx index 094a3667d..57144c865 100644 --- a/packages/gitbook/src/components/Header/Header.tsx +++ b/packages/gitbook/src/components/Header/Header.tsx @@ -165,10 +165,13 @@ export function Header(props: { 'page-default-width:2xl:px-[calc((100%-1536px+4rem)/2)]' )} > - {withVariants === 'generic' && ( + {withVariants ? ( - )} - {sections && - (sections.list.some((s) => s.object === 'site-section-group') || // If there's even a single group, show the tabs - sections.list.length > 1) && ( // Otherwise, show the tabs if there's more than one section - - )} + ) : null} + {sections + ? (sections.list.some( + (s) => s.object === 'site-section-group' + ) || // If there's even a single group, show the tabs + sections.list.length > 1) && ( // Otherwise, show the tabs if there's more than one section + + ) + : null} diff --git a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx index fb9f947eb..828fdb0ab 100644 --- a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx +++ b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx @@ -162,13 +162,16 @@ export function SpaceLayout(props: { )} /> )} - {withVariants === 'generic' && ( + {withVariants && (