mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 03:35:26 +03:00
jsonify dispatch
This commit is contained in:
parent
d8127a5592
commit
476e287f16
@ -39,7 +39,7 @@ export function WsProvider({
|
|||||||
const { sendJsonMessage, readyState } = useWebSocket(wsUrl, {
|
const { sendJsonMessage, readyState } = useWebSocket(wsUrl, {
|
||||||
|
|
||||||
onMessage: (event) => {
|
onMessage: (event) => {
|
||||||
dispatch(event.data);
|
dispatch(JSON.parse(event.data));
|
||||||
},
|
},
|
||||||
onOpen: () => dispatch({ topic: '__CLIENT_CONNECTED' }),
|
onOpen: () => dispatch({ topic: '__CLIENT_CONNECTED' }),
|
||||||
shouldReconnect: () => true,
|
shouldReconnect: () => true,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user