aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/GolfPlayApp.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-21 12:22:32 +0900
committernsfisis <nsfisis@gmail.com>2025-03-21 12:24:00 +0900
commita75f9fa78897de7317fe336e68db7a255899ae33 (patch)
tree3ec56670b7f51c0f2929dfc0c9a55ae48f6820af /frontend/app/components/GolfPlayApp.tsx
parent95903269b252729ee6573a5b607d98fa0223cd9a (diff)
downloadphperkaigi-2025-albatross-a75f9fa78897de7317fe336e68db7a255899ae33.tar.gz
phperkaigi-2025-albatross-a75f9fa78897de7317fe336e68db7a255899ae33.tar.zst
phperkaigi-2025-albatross-a75f9fa78897de7317fe336e68db7a255899ae33.zip
feat(frontend): do not transit to finished page
Diffstat (limited to 'frontend/app/components/GolfPlayApp.tsx')
-rw-r--r--frontend/app/components/GolfPlayApp.tsx6
1 files changed, 2 insertions, 4 deletions
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 />;
}
}