diff --git a/src/client/GamePage.tsx b/src/client/GamePage.tsx index 4a3beed..d82abce 100644 --- a/src/client/GamePage.tsx +++ b/src/client/GamePage.tsx @@ -12,29 +12,29 @@ type Info = { export const GamePage = () => { const {author, slug} = useParams(); - const [searchParams, setSearchParams] = useSearchParams(); - const room = searchParams.get('room'); + // const [searchParams, setSearchParams] = useSearchParams(); + // const room = searchParams.get('room'); const picoRef = useRef(null); - const socket = useWebsocket({ - url: `/api/ws/room?room=${room}`, - // url: "wss://echo.websocket.org", - onMessage({message}) { - // const msg = message as any; - // if (msg.type === "gpio") { - // if (picoRef.current) { - // const handle = picoRef.current.getPicoConsoleHandle(); - // if (handle) { - // console.log("updating pico gpio"); - // (handle.gpio as any).dontSend = true; - // handle.gpio.length = 0; - // handle.gpio.push(...msg.gpio); - // (handle.gpio as any).dontSend = false; - // } - // } - // } - console.log('message', message); - } - }) + // const socket = useWebsocket({ + // url: `/api/ws/room?room=${room}`, + // // url: "wss://echo.websocket.org", + // onMessage({message}) { + // // const msg = message as any; + // // if (msg.type === "gpio") { + // // if (picoRef.current) { + // // const handle = picoRef.current.getPicoConsoleHandle(); + // // if (handle) { + // // console.log("updating pico gpio"); + // // (handle.gpio as any).dontSend = true; + // // handle.gpio.length = 0; + // // handle.gpio.push(...msg.gpio); + // // (handle.gpio as any).dontSend = false; + // // } + // // } + // // } + // console.log('message', message); + // } + // }) // const version = searchParams.get('v'); const [v, setVersion] = useState(null); const [info, setInfo] = useState(null);