V2 fix offline (#294)

* fix: resolve path to UI build in dev

* fix: configure offline fetching
This commit is contained in:
Carlos Valente
2023-02-23 21:10:41 +01:00
committed by GitHub
parent 70cc071425
commit 03552056cb
11 changed files with 46 additions and 72 deletions
@@ -6,18 +6,14 @@ import { getOSC } from '../api/ontimeApi';
import { oscPlaceholderSettings } from '../models/OscSettings.type';
export default function useOscSettings() {
const {
data,
status,
isError,
refetch,
} = useQuery({
const { data, status, isError, refetch } = useQuery({
queryKey: OSC_SETTINGS,
queryFn: getOSC,
placeholderData: oscPlaceholderSettings,
retry: 5,
retryDelay: attempt => attempt * 2500,
retryDelay: (attempt) => attempt * 2500,
refetchInterval: queryRefetchIntervalSlow,
networkMode: 'always',
});
return { data, status, isError, refetch };