From a75f9fa78897de7317fe336e68db7a255899ae33 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 21 Mar 2025 12:22:32 +0900
Subject: feat(frontend): do not transit to finished page

---
 frontend/app/components/GolfPlayApp.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'frontend/app/components/GolfPlayApp.tsx')

diff --git a/frontend/app/components/GolfPlayApp.tsx b/frontend/app/components/GolfPlayApp.tsx
index 7953bac..9ba3818 100644
--- a/frontend/app/components/GolfPlayApp.tsx
+++ b/frontend/app/components/GolfPlayApp.tsx
@@ -14,7 +14,6 @@ import {
 	setGameStartedAtAtom,
 	setLatestGameStateAtom,
 } from "../states/play";
-import GolfPlayAppFinished from "./GolfPlayApps/GolfPlayAppFinished";
 import GolfPlayAppGaming from "./GolfPlayApps/GolfPlayAppGaming";
 import GolfPlayAppLoading from "./GolfPlayApps/GolfPlayAppLoading";
 import GolfPlayAppStarting from "./GolfPlayApps/GolfPlayAppStarting";
@@ -130,7 +129,7 @@ export default function GolfPlayApp({ game, player, initialGameState }: Props) {
 		);
 	} else if (gameStateKind === "starting") {
 		return <GolfPlayAppStarting gameDisplayName={game.display_name} />;
-	} else if (gameStateKind === "gaming") {
+	} else if (gameStateKind === "gaming" || gameStateKind === "finished") {
 		return (
 			<GolfPlayAppGaming
 				gameDisplayName={game.display_name}
@@ -141,9 +140,8 @@ export default function GolfPlayApp({ game, player, initialGameState }: Props) {
 				initialCode={initialGameState.code}
 				onCodeChange={onCodeChange}
 				onCodeSubmit={onCodeSubmit}
+				isFinished={gameStateKind === "finished"}
 			/>
 		);
-	} else if (gameStateKind === "finished") {
-		return <GolfPlayAppFinished />;
 	}
 }
-- 
cgit v1.3.1

