Update src/components/sections/hero/HeroVideoExpand.tsx
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { X } from 'lucide-react';
|
||||
|
||||
interface HeroVideoExpandProps {
|
||||
@@ -49,27 +48,22 @@ export default function HeroVideoExpand({ title, description, videoSrc, thumbnai
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AnimatePresence>
|
||||
{isOpen && (
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}
|
||||
className="fixed inset-0 z-50 flex items-center justify-center bg-black/90 p-4"
|
||||
{isOpen && (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/90 p-4">
|
||||
<button
|
||||
onClick={() => setIsOpen(false)}
|
||||
className="absolute top-6 right-6 text-white p-2 hover:bg-white/10 rounded-full"
|
||||
>
|
||||
<button
|
||||
onClick={() => setIsOpen(false)}
|
||||
className="absolute top-6 right-6 text-white p-2 hover:bg-white/10 rounded-full"
|
||||
>
|
||||
<X size={32} />
|
||||
</button>
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={videoSrc}
|
||||
controls
|
||||
className="w-full max-w-5xl rounded-lg"
|
||||
/>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
<X size={32} />
|
||||
</button>
|
||||
<video
|
||||
ref={videoRef}
|
||||
src={videoSrc}
|
||||
controls
|
||||
className="w-full max-w-5xl rounded-lg"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user