diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-05 20:52:43 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-05 20:53:02 +0900 |
| commit | 82d3cf35c3c6b85b48c94dd6301c8bf718669b8d (patch) | |
| tree | c09c53a3ae1f51aba02902d4f32ffafdf7fb562a /frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx | |
| parent | dd1c68425120fca008a3b10991c865ea586c7002 (diff) | |
| download | iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.tar.gz iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.tar.zst iosdc-japan-2025-albatross-82d3cf35c3c6b85b48c94dd6301c8bf718669b8d.zip | |
feat(frontend): support swift language
Diffstat (limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx')
| -rw-r--r-- | frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx index 54a5895..f06728d 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx @@ -7,6 +7,7 @@ import { latestGameStatesAtom, } from "../../states/watch"; import type { PlayerProfile } from "../../types/PlayerProfile"; +import type { SupportedLanguage } from "../../types/SupportedLanguage"; import FoldableBorderedContainerWithCaption from "../FoldableBorderedContainerWithCaption"; import CodeBlock from "../Gaming/CodeBlock"; import LeftTime from "../Gaming/LeftTime"; @@ -24,6 +25,7 @@ type Props = { playerProfileB: PlayerProfile | null; problemTitle: string; problemDescription: string; + problemLanguage: SupportedLanguage; sampleCode: string; }; @@ -33,6 +35,7 @@ export default function GolfWatchAppGaming1v1({ playerProfileB, problemTitle, problemDescription, + problemLanguage, sampleCode, }: Props) { const gameStateKind = useAtomValue(gameStateKindAtom); @@ -50,8 +53,8 @@ export default function GolfWatchAppGaming1v1({ const scoreB = stateB?.score ?? null; const statusB = stateB?.status ?? "none"; - const codeSizeA = calcCodeSize(codeA); - const codeSizeB = calcCodeSize(codeB); + const codeSizeA = calcCodeSize(codeA, problemLanguage); + const codeSizeB = calcCodeSize(codeB, problemLanguage); const gameResultKind = checkGameResultKind(gameStateKind, stateA, stateB); @@ -125,15 +128,16 @@ export default function GolfWatchAppGaming1v1({ <FoldableBorderedContainerWithCaption caption={`コードサイズ: ${codeSizeA}`} > - <CodeBlock code={codeA} language="php" /> + <CodeBlock code={codeA} language={problemLanguage} /> </FoldableBorderedContainerWithCaption> </TitledColumn> <TitledColumn title={problemTitle} className="order-1 md:order-2"> <ProblemColumnContent description={problemDescription} + language={problemLanguage} sampleCode={sampleCode} /> - <RankingTable /> + <RankingTable problemLanguage={problemLanguage} /> </TitledColumn> <TitledColumn title={<SubmitStatusLabel status={statusB} />} @@ -142,7 +146,7 @@ export default function GolfWatchAppGaming1v1({ <FoldableBorderedContainerWithCaption caption={`コードサイズ: ${codeSizeB}`} > - <CodeBlock code={codeB} language="php" /> + <CodeBlock code={codeB} language={problemLanguage} /> </FoldableBorderedContainerWithCaption> </TitledColumn> </ThreeColumnLayout> |
