From d8127a5592201ce9252b24b3802b795e42d6a49a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 13 Oct 2023 21:45:21 -0500 Subject: [PATCH] match context shape --- web/src/api/ws.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/api/ws.jsx b/web/src/api/ws.jsx index 9765ccca8..2f7757d61 100644 --- a/web/src/api/ws.jsx +++ b/web/src/api/ws.jsx @@ -5,7 +5,7 @@ import { useCallback, useContext, useEffect, useReducer } from 'preact/hooks'; import useWebSocket, { ReadyState } from 'react-use-websocket'; const initialState = Object.freeze({ __connected: false }); -export const WS = createContext({ state: initialState, connection: null }); +export const WS = createContext({ state: initialState, readyState: null, sendJsonMessage: () => {} }); function reducer(state, { topic, payload, retain }) { switch (topic) {