mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 19:25:22 +03:00
match context shape
This commit is contained in:
parent
a247571829
commit
d8127a5592
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user