mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-08-04 06:52:47 +00:00
🛜 feat: Enable Network Requests in Offline Mode (#11107)
This commit is contained in:
parent
f993189e66
commit
43c2c20dd7
1 changed files with 10 additions and 0 deletions
|
|
@ -18,6 +18,16 @@ const App = () => {
|
|||
const { setError } = useApiErrorBoundary();
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
// Always attempt network requests, even when navigator.onLine is false
|
||||
// This is needed because localhost is reachable without WiFi
|
||||
networkMode: 'always',
|
||||
},
|
||||
mutations: {
|
||||
networkMode: 'always',
|
||||
},
|
||||
},
|
||||
queryCache: new QueryCache({
|
||||
onError: (error) => {
|
||||
if (error?.response?.status === 401) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue