diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-15 21:10:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-15 21:10:51 +0900 |
| commit | 35d1be206c6be675d92839cfa209fceb5d1b6db9 (patch) | |
| tree | 31734172b78f11272c5267bf7bae1541411ce553 /frontend/app/components/GolfPlayApps | |
| parent | 27168df997c298e871d34e58fdc726bf2e8a4954 (diff) | |
| download | phperkaigi-2025-albatross-35d1be206c6be675d92839cfa209fceb5d1b6db9.tar.gz phperkaigi-2025-albatross-35d1be206c6be675d92839cfa209fceb5d1b6db9.tar.zst phperkaigi-2025-albatross-35d1be206c6be675d92839cfa209fceb5d1b6db9.zip | |
feat(frontend): show sample code in watch page
Diffstat (limited to 'frontend/app/components/GolfPlayApps')
| -rw-r--r-- | frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx index ec92556..5c5e149 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -8,8 +8,7 @@ import { statusAtom, } from "../../states/play"; import type { PlayerProfile } from "../../types/PlayerProfile"; -import BorderedContainer from "../BorderedContainer"; -import CodeBlock from "../Gaming/CodeBlock"; +import Problem from "../Gaming/Problem"; import SubmitResult from "../Gaming/SubmitResult"; import UserIcon from "../UserIcon"; @@ -81,22 +80,11 @@ export default function GolfPlayAppGaming({ </Link> </div> <div className="grow grid grid-cols-3 divide-x divide-gray-300"> - <div className="p-4"> - <div className="mb-2 text-xl font-bold">{problemTitle}</div> - <div className="p-2 flex flex-col gap-4"> - <BorderedContainer> - <pre className="text-gray-700 whitespace-pre-wrap break-words"> - {problemDescription} - </pre> - </BorderedContainer> - <BorderedContainer> - <div> - <h2>サンプルコード</h2> - <CodeBlock code={sampleCode} language="php" /> - </div> - </BorderedContainer> - </div> - </div> + <Problem + title={problemTitle} + description={problemDescription} + sampleCode={sampleCode} + /> <div className="p-4"> <textarea ref={textareaRef} |
