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));