diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-15 23:07:40 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-15 23:07:40 +0900 |
| commit | 172b6d3211d040e8d577afda80debce583c3bf7c (patch) | |
| tree | e62023aebb0924e8ad63c37e2d22f0a50a299eff /frontend/app/components/GolfPlayApp.tsx | |
| parent | c2e23841f446489c4d9b7d2b616f3de249159f5f (diff) | |
| download | phperkaigi-2025-albatross-172b6d3211d040e8d577afda80debce583c3bf7c.tar.gz phperkaigi-2025-albatross-172b6d3211d040e8d577afda80debce583c3bf7c.tar.zst phperkaigi-2025-albatross-172b6d3211d040e8d577afda80debce583c3bf7c.zip | |
feat(frontend): show loaing screen
Diffstat (limited to 'frontend/app/components/GolfPlayApp.tsx')
| -rw-r--r-- | frontend/app/components/GolfPlayApp.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/frontend/app/components/GolfPlayApp.tsx b/frontend/app/components/GolfPlayApp.tsx index e8fafbd..0bb66eb 100644 --- a/frontend/app/components/GolfPlayApp.tsx +++ b/frontend/app/components/GolfPlayApp.tsx @@ -20,6 +20,7 @@ import { } from "../states/play"; import GolfPlayAppFinished from "./GolfPlayApps/GolfPlayAppFinished"; import GolfPlayAppGaming from "./GolfPlayApps/GolfPlayAppGaming"; +import GolfPlayAppLoading from "./GolfPlayApps/GolfPlayAppLoading"; import GolfPlayAppStarting from "./GolfPlayApps/GolfPlayAppStarting"; import GolfPlayAppWaiting from "./GolfPlayApps/GolfPlayAppWaiting"; @@ -111,7 +112,9 @@ export default function GolfPlayApp({ game, player, initialCode }: Props) { setLatestGameState, ]); - if (gameStateKind === "waiting") { + if (gameStateKind === "loading") { + return <GolfPlayAppLoading />; + } else if (gameStateKind === "waiting") { return ( <GolfPlayAppWaiting gameDisplayName={game.display_name} @@ -135,7 +138,5 @@ export default function GolfPlayApp({ game, player, initialCode }: Props) { ); } else if (gameStateKind === "finished") { return <GolfPlayAppFinished />; - } else { - return null; } } |
