import { Link } from "@remix-run/react"; import React, { useRef } from "react"; import SubmitButton from "../../components/SubmitButton"; import type { PlayerInfo } from "../../models/PlayerInfo"; import BorderedContainer from "../BorderedContainer"; import SubmitStatusLabel from "../SubmitStatusLabel"; import ExecStatusIndicatorIcon from "../ExecStatusIndicatorIcon"; import { faArrowDown } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; type Props = { gameDisplayName: string; playerInfo: Omit; problemTitle: string; problemDescription: string; onCodeChange: (code: string) => void; onCodeSubmit: (code: string) => void; }; export default function GolfPlayAppGaming({ gameDisplayName, playerInfo, problemTitle, problemDescription, onCodeChange, onCodeSubmit, }: 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
{playerInfo.displayName}
{playerInfo.score}
{problemTitle}
{problemDescription}
提出
    {playerInfo.submitResult.execResults.map((r, idx) => (
  • {idx !== playerInfo.submitResult.execResults.length - 1 && (
    )}
    {r.label}
    {r.stdout} {r.stderr}
  • ))}
); }