Skip to content

Commit

Permalink
Fixed Settings not working in offline dev locally (#20246)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ronaldlangeveld committed May 23, 2024
1 parent 4a02938 commit 99232de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/admin-x-framework/src/utils/queryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
});
Expand Down

0 comments on commit 99232de

Please sign in to comment.