@@ -23,6 +23,12 @@ export function Header(props: {
23
23
const { context, withTopHeader, withVariants } = props ;
24
24
const { siteSpace, siteSpaces, sections, customization } = context ;
25
25
26
+ const withSections = Boolean (
27
+ sections &&
28
+ ( sections . list . length > 1 || // Show section tabs if there are at least 2 sections or at least 1 section group
29
+ sections . list . some ( ( s ) => s . object === 'site-section-group' ) )
30
+ ) ;
31
+
26
32
return (
27
33
< header
28
34
id = "site-header"
@@ -144,7 +150,7 @@ export function Header(props: {
144
150
</ div >
145
151
146
152
{ customization . header . links . length > 0 ||
147
- ( ! sections && withVariants === 'translations' ) ? (
153
+ ( ! withSections && withVariants === 'translations' ) ? (
148
154
< HeaderLinks >
149
155
{ customization . header . links . length > 0 ? (
150
156
< >
@@ -164,7 +170,7 @@ export function Header(props: {
164
170
/>
165
171
</ >
166
172
) : null }
167
- { ! sections && withVariants === 'translations' ? (
173
+ { ! withSections && withVariants === 'translations' ? (
168
174
< TranslationsDropdown
169
175
context = { context }
170
176
siteSpace = { siteSpace }
@@ -178,9 +184,7 @@ export function Header(props: {
178
184
</ div >
179
185
</ div >
180
186
181
- { sections &&
182
- ( sections . list . length > 1 || // Show section tabs if there are at least 2 sections or at least 1 section group
183
- sections . list . some ( ( s ) => s . object === 'site-section-group' ) ) ? (
187
+ { sections && withSections ? (
184
188
< div className = "transition-[padding] duration-300 lg:chat-open:pr-80 xl:chat-open:pr-96" >
185
189
< SiteSectionTabs sections = { encodeClientSiteSections ( context , sections ) } >
186
190
{ withVariants === 'translations' ? (
0 commit comments