mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 01:13:55 +00:00
rollback broadcastQueryClient
still trying to figure out why cache becomes undefined sometimes
This commit is contained in:
@@ -5,6 +5,7 @@ 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 { 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';
|
||||
@@ -16,6 +17,11 @@ broadcastQueryClient({
|
||||
queryClient,
|
||||
broadcastChannel: 'ontime',
|
||||
});
|
||||
// Seemed to cause issues
|
||||
// broadcastQueryClient({
|
||||
// queryClient,
|
||||
// broadcastChannel: 'ontime',
|
||||
// });
|
||||
|
||||
const SDefault = withSocket(DefaultPresenter);
|
||||
const SSpeaker = withSocket(PresenterView);
|
||||
|
||||
@@ -4,6 +4,7 @@ const refetchIntervalMs = 10000;
|
||||
export const useFetch = (namespace, fn) => {
|
||||
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
||||
refetchInterval: refetchIntervalMs,
|
||||
cacheTime: refetchIntervalMs,
|
||||
});
|
||||
|
||||
return { data, status, isError, refetch };
|
||||
|
||||
Reference in New Issue
Block a user