balibabu commited on
Commit
5112394
·
1 Parent(s): d3454f6

Fix: Delete unused code #3651 (#3852)

Browse files

### What problem does this PR solve?

Fix: Delete unused code #3651

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

web/package.json CHANGED
@@ -20,7 +20,6 @@
20
  "@ant-design/icons": "^5.2.6",
21
  "@ant-design/pro-components": "^2.6.46",
22
  "@ant-design/pro-layout": "^7.17.16",
23
- "@antv/g": "^6.1.11",
24
  "@antv/g6": "^5.0.10",
25
  "@hookform/resolvers": "^3.9.1",
26
  "@js-preview/excel": "^1.7.8",
@@ -73,7 +72,6 @@
73
  "react-i18next": "^14.0.0",
74
  "react-infinite-scroll-component": "^6.1.0",
75
  "react-markdown": "^9.0.1",
76
- "react-pdf": "^9.1.1",
77
  "react-pdf-highlighter": "^6.1.0",
78
  "react-string-replace": "^1.1.1",
79
  "react-syntax-highlighter": "^15.5.0",
 
20
  "@ant-design/icons": "^5.2.6",
21
  "@ant-design/pro-components": "^2.6.46",
22
  "@ant-design/pro-layout": "^7.17.16",
 
23
  "@antv/g6": "^5.0.10",
24
  "@hookform/resolvers": "^3.9.1",
25
  "@js-preview/excel": "^1.7.8",
 
72
  "react-i18next": "^14.0.0",
73
  "react-infinite-scroll-component": "^6.1.0",
74
  "react-markdown": "^9.0.1",
 
75
  "react-pdf-highlighter": "^6.1.0",
76
  "react-string-replace": "^1.1.1",
77
  "react-syntax-highlighter": "^15.5.0",
web/src/hooks/file-manager-hooks.ts CHANGED
@@ -131,23 +131,6 @@ export const useDownloadFile = () => {
131
  return { data, loading, downloadFile: mutateAsync };
132
  };
133
 
134
- export const useLoadFile = () => {
135
- const {
136
- data,
137
- isPending: loading,
138
- mutateAsync,
139
- error,
140
- } = useMutation({
141
- mutationKey: ['downloadFile'],
142
- mutationFn: async (params: { id: string }) => {
143
- const response = await fileManagerService.getFile({}, params.id);
144
- const blob = new Blob([response.data], { type: response.data.type });
145
- return blob;
146
- },
147
- });
148
- return { data, loading, loadFile: mutateAsync, error };
149
- };
150
-
151
  export const useRenameFile = () => {
152
  const queryClient = useQueryClient();
153
  const { t } = useTranslation();
 
131
  return { data, loading, downloadFile: mutateAsync };
132
  };
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  export const useRenameFile = () => {
135
  const queryClient = useQueryClient();
136
  const { t } = useTranslation();