From f844963ff0e86a9c9beae0a9a7be52122c9a3c7e Mon Sep 17 00:00:00 2001 From: Tanner Krewson Date: Sun, 28 Jul 2024 17:04:56 -0400 Subject: [PATCH] Fix lobby stuck in loading state --- pages/[gameCode].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/[gameCode].js b/pages/[gameCode].js index 96dbe64..721afda 100644 --- a/pages/[gameCode].js +++ b/pages/[gameCode].js @@ -22,7 +22,7 @@ const Game = ({ loading }) => { status: "loading", }); const [isRocketcrab, setIsRocketcrab] = useState(false); - const [isConnected, setIsConnected] = useState(false); + const [isConnected, setIsConnected] = useState(socket.connected); useEffect(() => { const cl = socket.on("connect", () => setIsConnected(true));