From 99232de6eecffebc500e2bd2697ade4e37289dce Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Thu, 23 May 2024 18:58:14 +0800 Subject: [PATCH] Fixed Settings not working in offline dev locally (#20246) ref https://forum.ghost.org/t/access-settings-of-local-ghost-install-when-offline/47590 - Fixed a React Query configuration that would only load Settings when you're connected to the internet. - Setting `networkMode: 'always'`, ensures that queries are executed regardless of the network status, bypassing any checks for internet connectivity. --- apps/admin-x-framework/src/utils/queryClient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/admin-x-framework/src/utils/queryClient.ts b/apps/admin-x-framework/src/utils/queryClient.ts index 7a3197e9166d..26a9cfe719c1 100644 --- a/apps/admin-x-framework/src/utils/queryClient.ts +++ b/apps/admin-x-framework/src/utils/queryClient.ts @@ -13,7 +13,8 @@ const queryClient = window.adminXQueryClient || new QueryClient({ staleTime: 5 * (60 * 1000), // 5 mins cacheTime: 10 * (60 * 1000), // 10 mins // We have custom retry logic for specific errors in fetchApi() - retry: false + retry: false, + networkMode: 'always' } } });