import React, { useEffect, useState, useRef } from 'react'; import useWindowWidth from '@/hooks/useWindowWidth'; import Image from 'next/image'; import { useImageProxy } from '@/hooks/useImageProxy'; import { useRouter } from 'next/router'; import GenericButton from '../buttons/GenericButton'; import HeroImage from '../../../public/images/hero-image.png'; const HeroBanner = () => { const [currentTech, setCurrentTech] = useState('Bitcoin'); const [isAnimating, setIsAnimating] = useState(false); const techs = ['Bitcoin', 'Lightning', 'Nostr']; const windowWidth = useWindowWidth(); const isTabView = windowWidth <= 1360; const router = useRouter(); const { returnImageProxy } = useImageProxy(); const videoRef = useRef(null); useEffect(() => { const interval = setInterval(() => { setIsAnimating(true); setTimeout(() => { setCurrentTech(prev => { const currentIndex = techs.indexOf(prev); return techs[(currentIndex + 1) % techs.length]; }); setIsAnimating(false); }, 400); // Half of the interval for smooth transition }, 2800); return () => clearInterval(interval); }, []); const getColorClass = (tech) => { switch (tech) { case 'Bitcoin': return 'text-orange-400'; case 'Lightning': return 'text-blue-500'; case 'Nostr': return 'text-purple-400'; default: return 'text-white'; } }; // useEffect(() => { // videoRef.current.play(); // }, []); return (