mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-01 20:39:18 +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 PresenterView from './features/viewers/presenter/PresenterView';
|
||||||
import { QueryClient, QueryClientProvider } from 'react-query';
|
import { QueryClient, QueryClientProvider } from 'react-query';
|
||||||
import { broadcastQueryClient } from 'react-query/broadcastQueryClient-experimental';
|
import { broadcastQueryClient } from 'react-query/broadcastQueryClient-experimental';
|
||||||
|
// import { broadcastQueryClient } from 'react-query/broadcastQueryClient-experimental';
|
||||||
import SocketProvider from './app/context/socketContext';
|
import SocketProvider from './app/context/socketContext';
|
||||||
import PresenterSimple from './features/viewers/presenter/PresenterSimple';
|
import PresenterSimple from './features/viewers/presenter/PresenterSimple';
|
||||||
import StageManager from './features/viewers/backstage/StageManager';
|
import StageManager from './features/viewers/backstage/StageManager';
|
||||||
@@ -16,6 +17,11 @@ broadcastQueryClient({
|
|||||||
queryClient,
|
queryClient,
|
||||||
broadcastChannel: 'ontime',
|
broadcastChannel: 'ontime',
|
||||||
});
|
});
|
||||||
|
// Seemed to cause issues
|
||||||
|
// broadcastQueryClient({
|
||||||
|
// queryClient,
|
||||||
|
// broadcastChannel: 'ontime',
|
||||||
|
// });
|
||||||
|
|
||||||
const SDefault = withSocket(DefaultPresenter);
|
const SDefault = withSocket(DefaultPresenter);
|
||||||
const SSpeaker = withSocket(PresenterView);
|
const SSpeaker = withSocket(PresenterView);
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ const refetchIntervalMs = 10000;
|
|||||||
export const useFetch = (namespace, fn) => {
|
export const useFetch = (namespace, fn) => {
|
||||||
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
||||||
refetchInterval: refetchIntervalMs,
|
refetchInterval: refetchIntervalMs,
|
||||||
|
cacheTime: refetchIntervalMs,
|
||||||
});
|
});
|
||||||
|
|
||||||
return { data, status, isError, refetch };
|
return { data, status, isError, refetch };
|
||||||
|
|||||||
Reference in New Issue
Block a user