mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix: Delete unused code #3651 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -131,23 +131,6 @@ export const useDownloadFile = () => {
|
||||
return { data, loading, downloadFile: mutateAsync };
|
||||
};
|
||||
|
||||
export const useLoadFile = () => {
|
||||
const {
|
||||
data,
|
||||
isPending: loading,
|
||||
mutateAsync,
|
||||
error,
|
||||
} = useMutation({
|
||||
mutationKey: ['downloadFile'],
|
||||
mutationFn: async (params: { id: string }) => {
|
||||
const response = await fileManagerService.getFile({}, params.id);
|
||||
const blob = new Blob([response.data], { type: response.data.type });
|
||||
return blob;
|
||||
},
|
||||
});
|
||||
return { data, loading, loadFile: mutateAsync, error };
|
||||
};
|
||||
|
||||
export const useRenameFile = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const { t } = useTranslation();
|
||||
|
||||
Reference in New Issue
Block a user