import Image from "next/image" import { useState, useRef, useEffect } from "react" import { useImageProxy } from "@/hooks/useImageProxy" import GenericButton from "@/components/buttons/GenericButton" import { useRouter } from "next/router" import useWindowWidth from "@/hooks/useWindowWidth" import NostrIcon from "../../../../public/images/nostr.png" import { useToast } from "@/hooks/useToast"; // With current spacing the title can only be 1 line const promotions = [ { id: 1, category: "PLEBDEVS", title: "Developer education / community platform", description: "PlebDevs is your gateway to mastering Bitcoin, Lightning, and Nostr technologies. Join our community of aspiring developers and start your journey today!", icon: "pi pi-code", video: "https://plebdevs-bucket.nyc3.cdn.digitaloceanspaces.com/plebdevs-montage.mp4", }, { id: 2, category: "CONTENT", title: "Comprehensive Learning Resources", description: "Access our extensive library of courses, videos, and documents. From structured learning paths to hands-on workshops, we've got everything you need to master Bitcoin, Lightning, and Nostr development.", icon: "pi pi-book", image: "https://media.istockphoto.com/id/1224500457/photo/programming-code-abstract-technology-background-of-software-developer-and-computer-script.jpg?s=612x612&w=0&k=20&c=nHMypkMTU1HUUW85Zt0Ff7MDbq17n0eVeXaoM9Knt4Q=", }, { id: 3, category: "COMMUNITY", title: "Join Our Community of learners / hackers", description: "Connect with other developers, share your projects, and get support from our community of Bitcoin enthusiasts.", icon: "pi pi-users", image: "https://pikwizard.com/pw/medium/50238b1cad4ff412fdafc1325efa1c9f.jpg", }, { id: 4, category: "LIGHTNING / NOSTR", title: "Lightning and Nostr integrated platform", description: "This platform is the first of its kind to integrate Lightning Network and Nostr protocols, allowing users to send and receive payments and interact with the Nostr network.", icon: "pi pi-bolt", image: "https://www.financemagnates.com/wp-content/uploads/2016/05/Bicoin-lightning.jpg", }, ] const InteractivePromotionalCarousel = () => { const [selectedPromotion, setSelectedPromotion] = useState(promotions[0]) const { returnImageProxy } = useImageProxy(); const { showToast } = useToast(); const windowWidth = useWindowWidth(); const isTabView = windowWidth <= 1360; const isMobile = windowWidth <= 768; const router = useRouter(); const videoRef = useRef(null); const copyToClipboard = async (text) => { try { await navigator.clipboard.writeText(text); showToast("success", "Copied", "Copied Lightning Address to clipboard"); if (window && window?.webln && window?.webln?.lnurl) { await window.webln.enable(); const result = await window.webln.lnurl("austin@bitcoinpleb.dev"); if (result && result?.preimage) { showToast("success", "Payment Sent", "Thank you for your donation!"); } } } catch (err) { console.error('Failed to copy:', err); } }; useEffect(() => { if (videoRef.current && selectedPromotion.video) { videoRef.current.play(); } }, [selectedPromotion]); return (
{selectedPromotion.description}
{selectedPromotion.description}
Welcome! 👋
Plebdevs is open source software and is still in early development. If you have any questions drop an issue on the Github repo, or reach out to me in the Community tab, cheers! - Austin
Welcome! 👋
Plebdevs is open source software and is still in early development. If you have any questions drop an issue on the Github repo, or reach out to me in the Community tab, cheers! - Austin