fix: null checks in FDVideoHeroBlock

This commit is contained in:
Jeffrey 2026-03-04 21:46:58 +01:00
parent d7f3a52838
commit 4e9e51004f

View File

@ -56,7 +56,7 @@ export const FDVideoHeroBlockComponent: React.FC<FDVideoHeroBlockProps> = (props
black: 'bg-black', black: 'bg-black',
navy: 'bg-fd-navy', navy: 'bg-fd-navy',
} }
const overlayClass = hasOverlay const overlayClass = hasOverlay && overlayColor && overlayStrength
? `${overlayBgMap[overlayColor] || ''} ${overlayOpacityMap[overlayStrength] || 'opacity-50'}` ? `${overlayBgMap[overlayColor] || ''} ${overlayOpacityMap[overlayStrength] || 'opacity-50'}`
: '' : ''
@ -71,7 +71,7 @@ export const FDVideoHeroBlockComponent: React.FC<FDVideoHeroBlockProps> = (props
large: 'min-h-[80vh]', large: 'min-h-[80vh]',
medium: 'min-h-[60vh]', medium: 'min-h-[60vh]',
} }
const heightClass = heightMap[minHeight] || 'min-h-screen' const heightClass = heightMap[minHeight || "screen"] || 'min-h-screen'
// Text alignment // Text alignment
const alignClass = textAlign === 'center' ? 'text-center items-center' : 'text-left items-start' const alignClass = textAlign === 'center' ? 'text-center items-center' : 'text-left items-start'