import React, { useEffect, useState } from 'react'; import Image from 'next/image'; const HeroBanner = () => { const options = ['Bitcoin', 'Lightning', 'Nostr']; const [currentOption, setCurrentOption] = useState(0); const [fade, setFade] = useState(true); useEffect(() => { const interval = setInterval(() => { setFade(false); setTimeout(() => { setCurrentOption((prevOption) => (prevOption + 1) % options.length); setFade(true); }, 700); // Half the interval time }, 1500); // Change text every 2 seconds return () => clearInterval(interval); }, []); return (
Banner

Learn how to code

Build{' '} {options[currentOption]} {' '}apps

Become a Bitcoin developer

); }; export default HeroBanner;