import { useState } from "react"; interface RevealProps { revealMove: string; setRevealMove: (v: string) => void; handleReveal: () => void; loading: boolean; account: string; contract: any; bothRevealed: string; handleBothRevealed: () => void; playerARevealed: string; handlePlayerARevealed: () => void; playerBRevealed: string; handlePlayerBRevealed: () => void; } export default function Reveal({ revealMove, setRevealMove, handleReveal, loading, account, contract, bothRevealed, handleBothRevealed, playerARevealed, handlePlayerARevealed, playerBRevealed, handlePlayerBRevealed, }: Readonly) { const [revealTimeLeft, setRevealTimeLeft] = useState(""); const handleRevealTimeLeft = async () => { if (!contract) return; try { const res = await contract.methods.revealTimeLeft().call(); setRevealTimeLeft(res.toString()); } catch (err: any) { console.error("Failed to fetch revealTimeLeft: " + err.message); } }; return (

reveal(string clearMove)

setRevealMove(e.target.value)} className="border px-2 py-1 mr-2 rounded" />
{bothRevealed}
{playerARevealed}
{playerBRevealed}
{revealTimeLeft}
); }