fix: remove unused libraries #1306 (#1649)

### 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:
balibabu
2024-07-23 15:03:58 +08:00
committed by GitHub
parent 792a1a9d91
commit 022afbb39d
7 changed files with 80 additions and 147 deletions

View File

@@ -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([]);
}