From 2794e9de67781614edc17336b284266d3e4a740c Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 28 Feb 2026 15:04:21 +0900
Subject: feat(admin): allow admin users to view and submit code before game
 starts

Admin users can now access the gaming UI (problem description, code
editor, submit button) even when a game has not started yet. Regular
users still see the waiting screen as before.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---
 frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx')

diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
index 7d81c82..fa9a2b4 100644
--- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
+++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx
@@ -43,7 +43,7 @@ export default function GolfPlayAppGaming({
 	onCodeSubmit,
 	isFinished,
 }: Props) {
-	const leftTimeSeconds = useAtomValue(gamingLeftTimeSecondsAtom)!;
+	const leftTimeSeconds = useAtomValue(gamingLeftTimeSecondsAtom);
 	const score = useAtomValue(scoreAtom);
 	const status = useAtomValue(statusAtom);
 
@@ -72,6 +72,8 @@ export default function GolfPlayAppGaming({
 					<div className="text-gray-100">{gameDisplayName}</div>
 					{isFinished ? (
 						<div className="text-2xl md:text-3xl">終了</div>
+					) : leftTimeSeconds === null ? (
+						<div className="text-2xl md:text-3xl">未開始</div>
 					) : (
 						<LeftTime sec={leftTimeSeconds} />
 					)}
-- 
cgit v1.3.1

