### What problem does this PR solve? fix: remove unused libraries #1306 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -2,9 +2,9 @@ import { useSetModalState, useShowDeleteConfirm } from '@/hooks/common-hooks';
|
||||
import {
|
||||
useConnectToKnowledge,
|
||||
useCreateFolder,
|
||||
useDeleteFile,
|
||||
useFetchFileList,
|
||||
useFetchParentFolderList,
|
||||
useRemoveFile,
|
||||
useRenameFile,
|
||||
useSelectFileList,
|
||||
useSelectParentFolderList,
|
||||
@@ -215,14 +215,14 @@ export const useHandleDeleteFile = (
|
||||
fileIds: string[],
|
||||
setSelectedRowKeys: (keys: string[]) => void,
|
||||
) => {
|
||||
const removeDocument = useRemoveFile();
|
||||
const { deleteFile: removeDocument } = useDeleteFile();
|
||||
const showDeleteConfirm = useShowDeleteConfirm();
|
||||
const parentId = useGetFolderId();
|
||||
|
||||
const handleRemoveFile = () => {
|
||||
showDeleteConfirm({
|
||||
onOk: async () => {
|
||||
const retcode = await removeDocument(fileIds, parentId);
|
||||
const retcode = await removeDocument({ fileIds, parentId });
|
||||
if (retcode === 0) {
|
||||
setSelectedRowKeys([]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user