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 (
Mind that gambling isn't that dangerous
Would you like to reset?