import { useEffect, useState } from "react"; import { URL_WHITEPAPER, URL_TELEGRAM } from "../shared/constants"; interface FirstVisitModalProps { isOpen: boolean; onClose: () => void; } export function FirstVisitModal({ isOpen, onClose }: FirstVisitModalProps) { const [shouldRender, setShouldRender] = useState(isOpen); const [animationClass, setAnimationClass] = useState(""); useEffect(() => { if (isOpen) { setShouldRender(true); setAnimationClass("modal-enter"); } else { setAnimationClass("modal-exit"); // Wait for animation to finish before unmounting const timer = setTimeout(() => setShouldRender(false), 200); // match animation duration return () => clearTimeout(timer); } }, [isOpen]); if (!shouldRender) return null; return (
e.stopPropagation()} >

Welcome to DuelFi.io!

Challenge your friends (or strangers) in head-to-head skill games and earn from your victories!

Create or join duels, set an entry fee, and the winner takes all.

{[ { step: "New here? Check out our", desc: "Whitepaper to understand how everything works.", link: URL_WHITEPAPER }, { step: "Got questions or just wanna vibe with the squad?", desc: "Join our Telegram.", link: URL_TELEGRAM }, ].map(({ step, desc, link }, index) => (
window.open(link, "_blank")}>

{step}

{desc}

))}
); }