mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Refactor Datasets UI #3221. ### Type of change - [X] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -228,11 +228,18 @@ export const useUpdateKnowledge = (shouldFetchList = false) => {
|
||||
return { data, loading, saveKnowledgeConfiguration: mutateAsync };
|
||||
};
|
||||
|
||||
export const useFetchKnowledgeBaseConfiguration = () => {
|
||||
export const useFetchKnowledgeBaseConfiguration = (refreshCount?: number) => {
|
||||
const { id } = useParams();
|
||||
|
||||
let queryKey: (KnowledgeApiAction | number)[] = [
|
||||
KnowledgeApiAction.FetchKnowledgeDetail,
|
||||
];
|
||||
if (typeof refreshCount === 'number') {
|
||||
queryKey = [KnowledgeApiAction.FetchKnowledgeDetail, refreshCount];
|
||||
}
|
||||
|
||||
const { data, isFetching: loading } = useQuery<IKnowledge>({
|
||||
queryKey: [KnowledgeApiAction.FetchKnowledgeDetail],
|
||||
queryKey,
|
||||
initialData: {} as IKnowledge,
|
||||
gcTime: 0,
|
||||
queryFn: async () => {
|
||||
|
||||
Reference in New Issue
Block a user