From 7720afcdc383632f7672d355456909f78be1e948 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 29 Jul 2024 23:30:52 +0900
Subject: fix: problem not available in watching page

---
 frontend/app/components/GolfWatchApp.client.tsx | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

(limited to 'frontend/app/components/GolfWatchApp.client.tsx')

diff --git a/frontend/app/components/GolfWatchApp.client.tsx b/frontend/app/components/GolfWatchApp.client.tsx
index 00ad005..a76f2c9 100644
--- a/frontend/app/components/GolfWatchApp.client.tsx
+++ b/frontend/app/components/GolfWatchApp.client.tsx
@@ -10,7 +10,6 @@ import GolfWatchAppFinished from "./GolfWatchApps/GolfWatchAppFinished";
 type WebSocketMessage = components["schemas"]["GameWatcherMessageS2C"];
 
 type Game = components["schemas"]["Game"];
-type Problem = components["schemas"]["Problem"];
 
 type GameState = "connecting" | "waiting" | "starting" | "gaming" | "finished";
 
@@ -34,8 +33,6 @@ export default function GolfWatchApp({
 
   const [gameState, setGameState] = useState<GameState>("connecting");
 
-  const [problem, setProblem] = useState<Problem | null>(null);
-
   const [startedAt, setStartedAt] = useState<number | null>(null);
 
   const [timeLeftSeconds, setTimeLeftSeconds] = useState<number | null>(null);
@@ -127,7 +124,7 @@ export default function GolfWatchApp({
   } else if (gameState === "gaming") {
     return (
       <GolfWatchAppGaming
-        problem={problem!.description}
+        problem={game.problem!.description}
         codeA={codeA}
         scoreA={scoreA}
         codeB={codeB}
-- 
cgit v1.3.1

