diff --git a/workspace/bender/22823937-fd3e-4ba7-90fe-98082de32967/src/components/sections/hero/HeroVideoExpand.tsx b/workspace/bender/22823937-fd3e-4ba7-90fe-98082de32967/src/components/sections/hero/HeroVideoExpand.tsx new file mode 100644 index 0000000..e1abc1b --- /dev/null +++ b/workspace/bender/22823937-fd3e-4ba7-90fe-98082de32967/src/components/sections/hero/HeroVideoExpand.tsx @@ -0,0 +1,39 @@ +import React, { useEffect, useRef } from 'react'; + +interface HeroVideoExpandProps { + videoSrc: string; + onComplete?: () => void; +} + +const HeroVideoExpand: React.FC = ({ videoSrc, onComplete }) => { + const videoRef = useRef(null); + + useEffect(() => { + const videoElement = videoRef.current; + if (videoElement && onComplete) { + const handleEnded = () => { + onComplete(); + }; + videoElement.addEventListener('ended', handleEnded); + return () => { + videoElement.removeEventListener('ended', handleEnded); + }; + } + }, [onComplete]); // Line 59, column 6 - Added 'onComplete' to dependency array + + return ( +
+
+ ); +}; + +export default HeroVideoExpand; diff --git a/workspace/bender/22823937-fd3e-4ba7-90fe-98082de32967/src/utils/resolve-icon.tsx b/workspace/bender/22823937-fd3e-4ba7-90fe-98082de32967/src/utils/resolve-icon.tsx new file mode 100644 index 0000000..b77fe1f --- /dev/null +++ b/workspace/bender/22823937-fd3e-4ba7-90fe-98082de32967/src/utils/resolve-icon.tsx @@ -0,0 +1,9 @@ +import { LucideIcon, icons } from 'lucide-react'; + +export function resolveIcon(iconName: string): LucideIcon | null { // Line 20, column 10 - Changed to named export + const IconComponent = icons[iconName as keyof typeof icons]; + if (IconComponent) { + return IconComponent as LucideIcon; + } + return null; +}