import { useState } from "react"; import "./app.css"; import { motion } from "motion/react"; export function Welcome() { const [rolling, setRolling] = useState(false); const [showResetPopup, setShowResetPopup] = useState(false); const handleRollClick = () => { if (!rolling) { setRolling(true); } }; const handleAnimationComplete = () => { setShowResetPopup(true); }; const handleReset = () => { setRolling(false); setShowResetPopup(false); }; const rollButtonVariants = { initial: { scale: 1, rotateY: 0 }, clicked: { scale: [1, 1.1, 1], rotateY: [0, 20, 0], transition: { duration: 0.5, ease: "easeInOut" }, }, }; return (

Welcome to Aindustries' casino

Mind that gambling isn't that dangerous

{Array.from({ length: 150 }).map((_, index) => (
{(() => { const chance = Math.random(); let colorClass = "text-blue-500"; if (chance < 0.7) { colorClass = "text-blue-500"; } else if (chance < 0.9) { colorClass = "text-yellow-500"; } else { colorClass = "text-red-500"; } return {index + 1}; })()}
))}

ROLL

Cost per roll : 6 $
{showResetPopup && (

Dragon Lore

Would you like to reset?

)}
); }