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 isMobile = windowWidth <= 800; 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'; } }; return (
Banner

Learn to code Build {currentTech} apps Become a dev

{isMobile ? (

A one of a kind developer education and community platform built on Nostr and fully Lightning integrated.

) : (

A one of a kind developer education and community platform built on Nostr and fully Lightning integrated.

)}
router.push('/content?tag=all')} /> router.push('/feed?channel=global')} />
); }; export default HeroBanner;