import { Link } from "@remix-run/react"; import React, { useRef } from "react"; import SubmitButton from "../../components/SubmitButton"; import BorderedContainer from "../BorderedContainer"; type Props = { gameDisplayName: string; playerDisplayName: string; problemTitle: string; problemDescription: string; onCodeChange: (code: string) => void; onCodeSubmit: (code: string) => void; currentScore: number | null; lastExecStatus: string | null; }; export default function GolfPlayAppGaming({ gameDisplayName, playerDisplayName, problemTitle, problemDescription, onCodeChange, onCodeSubmit, currentScore, lastExecStatus, }: Props) { const textareaRef = useRef(null); const handleTextChange = (e: React.ChangeEvent) => { onCodeChange(e.target.value); }; const handleSubmitButtonClick = () => { if (textareaRef.current) { onCodeSubmit(textareaRef.current.value); } }; return (
{gameDisplayName}
03:21
{playerDisplayName}
{problemTitle}
{problemDescription}
提出
Score: {currentScore ?? "-"} ({lastExecStatus ?? "-"})
); }