Skip to content

Commit

Permalink
Fix: Delete unused code #3651 (#3852)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

Fix: Delete unused code #3651

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
cike8899 authored Dec 4, 2024
1 parent 41e2dad commit cf37e2e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
2 changes: 0 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@ant-design/icons": "^5.2.6",
"@ant-design/pro-components": "^2.6.46",
"@ant-design/pro-layout": "^7.17.16",
"@antv/g": "^6.1.11",
"@antv/g6": "^5.0.10",
"@hookform/resolvers": "^3.9.1",
"@js-preview/excel": "^1.7.8",
Expand Down Expand Up @@ -73,7 +72,6 @@
"react-i18next": "^14.0.0",
"react-infinite-scroll-component": "^6.1.0",
"react-markdown": "^9.0.1",
"react-pdf": "^9.1.1",
"react-pdf-highlighter": "^6.1.0",
"react-string-replace": "^1.1.1",
"react-syntax-highlighter": "^15.5.0",
Expand Down
17 changes: 0 additions & 17 deletions web/src/hooks/file-manager-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cf37e2e

Please sign in to comment.