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 { Avatar } from 'primereact/avatar'; import { AvatarGroup } from 'primereact/avatargroup'; import GenericButton from '../buttons/GenericButton'; import HeroImage from '../../../public/images/hero-image.png'; import plebdevsGuy from '../../../public/images/plebdevs-guy.png'; const HeroBanner = () => { const [currentTech, setCurrentTech] = useState('Bitcoin'); const [isAnimating, setIsAnimating] = useState(false); const techs = ['Bitcoin', 'Lightning', 'Nostr']; const windowWidth = useWindowWidth(); const router = useRouter(); const { returnImageProxy } = useImageProxy(); const isTabView = windowWidth <= 1360; const isMobile = windowWidth <= 800; const isWideScreen = windowWidth >= 2200; const isSuperWideScreen = windowWidth >= 2600; 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'; } }; const getHeroHeight = () => { if (isSuperWideScreen) return 'h-[900px]'; if (isWideScreen) return 'h-[700px]'; if (isMobile) return 'h-[450px]'; return 'h-[600px]'; }; return (
Banner
{!isTabView && (
)}

Learn to code Build on{' '} {currentTech} Become a dev

{isMobile ? (

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

) : (

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

)}
window.open('https://www.udemy.com/user/austin-james-kelsay/', '_blank')} >
{Array.from({ length: 5 }).map((_, index) => ( ))}

4.87

500+ students enrolled
} rounded severity="info" className="border-2" size={isMobile ? null : "large"} outlined onClick={() => router.push('/content?tag=all')} /> } rounded size={isMobile ? null : "large"} severity="success" className="border-2" outlined onClick={() => router.push('/feed?channel=global')} />
); }; export default HeroBanner;