From 9dd318313325e0d8925e6259db48709886e143c2 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 16 Apr 2026 22:38:28 -0700 Subject: fix: disable scrolling on typing game screen --- src/app/game/page.tsx | 48 ++++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) (limited to 'src/app/game/page.tsx') diff --git a/src/app/game/page.tsx b/src/app/game/page.tsx index fa5f6b1..02ea319 100644 --- a/src/app/game/page.tsx +++ b/src/app/game/page.tsx @@ -17,6 +17,7 @@ import { toast, ToastContainer } from "react-toastify"; import "react-toastify/dist/ReactToastify.css"; import { GameRoot, + GameGlobalStyle, GameNavbar, GameContent, HUD, @@ -90,6 +91,10 @@ function GameInner() { const searchParams = useSearchParams(); const router = useRouter(); + useEffect(() => { + window.scrollTo({ top: 0, left: 0, behavior: "auto" }); + }, []); + const audioRef = useRef(null); const videoRef = useRef(null); const gameStartTimeRef = useRef(0); @@ -860,25 +865,28 @@ function GameInner() { export default function GamePage() { return ( - -
- Loading... -
- - } - > - -
+ <> + + +
+ Loading... +
+ + } + > + +
+ ); } -- cgit v1.2.3