Merge version_1_1780754009380 into main #2
@@ -0,0 +1,39 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
|
||||
interface HeroVideoExpandProps {
|
||||
videoSrc: string;
|
||||
onComplete?: () => void;
|
||||
}
|
||||
|
||||
const HeroVideoExpand: React.FC<HeroVideoExpandProps> = ({ videoSrc, onComplete }) => {
|
||||
const videoRef = useRef<HTMLVideoElement>(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 (
|
||||
<div className="relative w-full h-full overflow-hidden">
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={videoSrc}
|
||||
className="absolute inset-0 w-full h-full object-cover"
|
||||
autoPlay
|
||||
muted
|
||||
loop
|
||||
playsInline
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HeroVideoExpand;
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user