import React, { useRef } from "react"; type Props = { problem: string; onCodeChange: (code: string) => void; onCodeSubmit: (code: string) => void; currentScore: number | null; }; export default function GolfPlayAppGaming({ problem, onCodeChange, onCodeSubmit, currentScore, }: Props) { const textareaRef = useRef(null); const handleTextChange = (e: React.ChangeEvent) => { onCodeChange(e.target.value); }; const handleSubmitButtonClick = () => { if (textareaRef.current) { onCodeSubmit(textareaRef.current.value); } }; return (
TODO
{problem}
Score: {currentScore == null ? "-" : `${currentScore}`}
); }