From fc6e72d7eafabe012cb93d4f34ac09b23d4fd031 Mon Sep 17 00:00:00 2001 From: Alaister Young Date: Mon, 4 Sep 2023 17:25:46 +1000 Subject: [PATCH] fix(local): allow offline --- studio/data/query-client.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/studio/data/query-client.ts b/studio/data/query-client.ts index 73cbb94e64b..eebd40b928d 100644 --- a/studio/data/query-client.ts +++ b/studio/data/query-client.ts @@ -1,6 +1,13 @@ -import { QueryClient } from '@tanstack/react-query' +import { QueryClient, onlineManager } from '@tanstack/react-query' +import { IS_PLATFORM } from 'lib/constants' import { useState } from 'react' +// When running locally we don't need the internet +// so we can pretend we're online all the time +if (!IS_PLATFORM) { + onlineManager.setOnline(true) +} + let queryClient: QueryClient | undefined export function getQueryClient() {