mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 05:13:32 +00:00
improvements in react-query
- fetch to useFetch hook - refetch every 10s - sync browser tabs with experimental broadcastQueryClient
This commit is contained in:
@@ -4,6 +4,7 @@ import Editor from './features/editors/Editor';
|
||||
import DefaultPresenter from './features/viewers/DefaultPresenter';
|
||||
import PresenterView from './features/viewers/presenter/PresenterView';
|
||||
import { QueryClient, QueryClientProvider } from 'react-query';
|
||||
import { broadcastQueryClient } from 'react-query/broadcastQueryClient-experimental';
|
||||
import SocketProvider from './app/context/socketContext';
|
||||
import PresenterSimple from './features/viewers/presenter/PresenterSimple';
|
||||
import StageManager from './features/viewers/backstage/StageManager';
|
||||
@@ -11,6 +12,10 @@ import withSocket from './features/viewers/ViewWrapper';
|
||||
import Lower from './features/viewers/lower/Lower';
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
broadcastQueryClient({
|
||||
queryClient,
|
||||
broadcastChannel: 'ontime',
|
||||
});
|
||||
|
||||
const SDefault = withSocket(DefaultPresenter);
|
||||
const SSpeaker = withSocket(PresenterView);
|
||||
|
||||
Reference in New Issue
Block a user