mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 13:38:00 +00:00
fix @node-rs/jieba and window not found (#1313)
* dynamic import * perf: entry * fix: jieba package
This commit is contained in:
20
projects/app/src/web/context/QueryClient.tsx
Normal file
20
projects/app/src/web/context/QueryClient.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
// Create a client
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
keepPreviousData: true,
|
||||
refetchOnWindowFocus: false,
|
||||
retry: false,
|
||||
cacheTime: 10
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const QueryClientContext = ({ children }: { children: ReactNode }) => {
|
||||
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
|
||||
};
|
||||
|
||||
export default QueryClientContext;
|
Reference in New Issue
Block a user