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/GolfWatchApps/GolfWatchAppGaming1v1.tsx | |
| parent | 27168df997c298e871d34e58fdc726bf2e8a4954 (diff) | |
| download | iosdc-japan-2025-albatross-35d1be206c6be675d92839cfa209fceb5d1b6db9.tar.gz iosdc-japan-2025-albatross-35d1be206c6be675d92839cfa209fceb5d1b6db9.tar.zst iosdc-japan-2025-albatross-35d1be206c6be675d92839cfa209fceb5d1b6db9.zip | |
feat(frontend): show sample code in watch page
Diffstat (limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx')
| -rw-r--r-- | frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx index ec18bbc..d9ee800 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx @@ -4,8 +4,8 @@ import { latestGameStatesAtom, } from "../../states/watch"; import type { PlayerProfile } from "../../types/PlayerProfile"; -import BorderedContainer from "../BorderedContainer"; import CodeBlock from "../Gaming/CodeBlock"; +import Problem from "../Gaming/Problem"; import ScoreBar from "../Gaming/ScoreBar"; import SubmitResult from "../Gaming/SubmitResult"; import UserIcon from "../UserIcon"; @@ -16,6 +16,7 @@ type Props = { playerProfileB: PlayerProfile; problemTitle: string; problemDescription: string; + sampleCode: string; gameResult: "winA" | "winB" | "draw" | null; }; @@ -25,6 +26,7 @@ export default function GolfWatchAppGaming1v1({ playerProfileB, problemTitle, problemDescription, + sampleCode, gameResult, }: Props) { const leftTimeSeconds = useAtomValue(gamingLeftTimeSecondsAtom)!; @@ -114,16 +116,11 @@ export default function GolfWatchAppGaming1v1({ <SubmitResult status={statusA} /> <SubmitResult status={statusB} /> </div> - <div> - <div className="mb-2 text-center text-xl font-bold"> - {problemTitle} - </div> - <BorderedContainer> - <pre className="text-gray-700 whitespace-pre-wrap break-words"> - {problemDescription} - </pre> - </BorderedContainer> - </div> + <Problem + title={problemTitle} + description={problemDescription} + sampleCode={sampleCode} + /> </div> <CodeBlock code={codeB} language="php" /> </div> |
