fix(cms): expand HERO_TYPES to support HERO_ARTICLE and minimal variants for transparent header

This commit is contained in:
Your Name committed 2026-09-24 07:02:26 +07:00
1 parent a176ab327c
commit c41b039287
3 files changed
+33 -3

No files matched your search

@@ -1897,8 +1897,19 @@ export default function DynamicPageRenderer({ sections, categories, lang: langPr
const lang = langProp ?? i18nLang
useEffect(() => {
const HERO_TYPES = new Set(['HERO', 'HERO_V2', 'HERO_VIDEO'])
const HERO_TYPES = new Set([
'HERO',
'HERO_V2',
'HERO_VIDEO',
'HERO_ARTICLE',
'HERO_MINIMAL',
'HERO_SPLIT_MINIMAL',
'HERO_VIDEO_MINIMAL',
])
const firstActiveSection = sections.find(s => s.isActive && s.type.toUpperCase() !== 'ANNOUNCEMENT_BAR')
if (!firstActiveSection && sections.length > 0 && sections.every(s => !s.isActive || s.type.toUpperCase() === 'ANNOUNCEMENT_BAR')) {
return
}
const isHero = Boolean(firstActiveSection && HERO_TYPES.has(firstActiveSection.type.toUpperCase()))
if (typeof document !== 'undefined') {