From a27c31ce03e04560ad3856ff0934705900a4ef85 Mon Sep 17 00:00:00 2001 From: Sewmina Date: Tue, 19 Aug 2025 13:31:50 +0530 Subject: [PATCH] practice mode --- app/page.tsx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 158a938..0db2c12 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -29,6 +29,7 @@ export default function Home() { const [dashboardError, setDashboardError] = useState(null); const [isRefreshing, setIsRefreshing] = useState(false); const [refreshCounter, setRefreshCounter] = useState(0); + const [isPracticeMode, setIsPracticeMode] = useState(false); const headerRef = useRef(null); // Poll for available tickets every 5 seconds (only when no ticket is available) @@ -161,6 +162,7 @@ export default function Home() { console.log("game_close_signal", status); setHasTicket(false); setTicketTxHash(null); + setIsPracticeMode(false); }; // Auto-hide payment success panel after 5 seconds @@ -315,11 +317,15 @@ export default function Home() {
- {/* Game iframe - shown when user has a ticket */} - {hasTicket && ( + {/* Game iframe - shown when user has a ticket or in practice mode */} + {(hasTicket || isPracticeMode) && (
+