fix: fetch user by @tanstack/react-query #1306 (#1709)

### What problem does this PR solve?

fix: fetch user by @tanstack/react-query #1306

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu
2024-07-25 18:53:10 +08:00
committed by GitHub
parent 375f621405
commit 935687998e
22 changed files with 107 additions and 340 deletions

View File

@ -11,7 +11,6 @@ import {
} from '@/hooks/document-hooks';
import { useGetKnowledgeSearchParams } from '@/hooks/route-hook';
import { useOneNamespaceEffectsLoading } from '@/hooks/store-hooks';
import { useFetchTenantInfo } from '@/hooks/user-setting-hooks';
import { Pagination } from '@/interfaces/common';
import { IChangeParserConfigRequestBody } from '@/interfaces/request/document';
import { getUnSupportedFilesCount } from '@/utils/document-util';
@ -25,8 +24,6 @@ export const useFetchDocumentListOnMount = () => {
const fetchDocumentList = useFetchDocumentList();
const dispatch = useDispatch();
useFetchTenantInfo();
useEffect(() => {
if (knowledgeId) {
fetchDocumentList();

View File

@ -4,10 +4,7 @@ import {
} from '@/hooks/knowledge-hooks';
import { useSelectLlmOptions } from '@/hooks/llm-hooks';
import { useNavigateToDataset } from '@/hooks/route-hook';
import {
useFetchTenantInfo,
useSelectParserList,
} from '@/hooks/user-setting-hooks';
import { useSelectParserList } from '@/hooks/user-setting-hooks';
import {
getBase64FromUploadFileList,
getUploadFileListFromBase64,
@ -43,7 +40,6 @@ export const useFetchKnowledgeConfigurationOnMount = (form: FormInstance) => {
const parserList = useSelectParserList();
const embeddingModelOptions = useSelectLlmOptions();
useFetchTenantInfo();
const { data: knowledgeDetails } = useFetchKnowledgeBaseConfiguration();
useEffect(() => {