diff --git a/src/tictactoe/TicTacToe.tsx b/src/tictactoe/TicTacToe.tsx index 4aac9dd..a7e16ec 100644 --- a/src/tictactoe/TicTacToe.tsx +++ b/src/tictactoe/TicTacToe.tsx @@ -33,29 +33,17 @@ export default function TicTacToe() { } } + useEffect(() => { + document.body.style.overflow = "hidden"; + return () => { + document.body.style.overflow = "auto"; + }; + }, []); + useEffect(() => { onMatchData(onMatchDataCallback); }, [onMatchData]); - // useEffect(() => { - // let active = true; - // - // async function refreshLoop() { - // while (active) { - // const matches = await listOpenMatches(); - // setOpenMatches(matches); - // - // await new Promise(res => setTimeout(res, 500)); // 0.5s refresh - // } - // } - // - // refreshLoop(); - // - // return () => { - // active = false; - // }; - // }, [listOpenMatches]); - // ------------------------------------------ // SEND A MOVE // ------------------------------------------ @@ -66,73 +54,66 @@ export default function TicTacToe() { } return ( - - {/* Game header bar */} - Tic Tac Toe Multiplayer - + - {/* Player component panel */} -
-
- {/* Board display container */} - - +
+ +
-
+ ); } diff --git a/src/tictactoe/styles.css b/src/tictactoe/styles.css index 5a0fd1c..86e1555 100644 --- a/src/tictactoe/styles.css +++ b/src/tictactoe/styles.css @@ -3,7 +3,6 @@ body { background: #eaeef3; display: flex; justify-content: center; - padding-top: 50px; margin: 0; color: #222; }