From 82d3cf35c3c6b85b48c94dd6301c8bf718669b8d Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 5 Sep 2025 20:52:43 +0900
Subject: feat(frontend): support swift language

---
 .../app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppGaming1v1.tsx')

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>
-- 
cgit v1.2.3-70-g09d2

