Skip to content

Commit 85b8202

Browse files
[ui-core] chore: replace qsEncodeData with encodeData (#4231)
1 parent d1514e5 commit 85b8202

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

desktop/core/src/desktop/js/apps/storageBrowser/StorageBrowserTab/StorageBrowserTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const StorageBrowserTab = ({ fileSystem, testId }: StorageBrowserTabProps): JSX.
8383
error,
8484
reloadData
8585
} = useLoadData<FileStats, { path: string }, AxiosError>(FILE_STATS_API_URL, {
86-
fetchOptions: { isRawError: true },
86+
options: { isRawError: true },
8787
params: { path: filePath },
8888
skip: !filePath
8989
});

desktop/core/src/desktop/js/utils/hooks/useLoadData/useLoadData.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { convertKeysToCamelCase } from '../../../utils/string/changeCasing';
2020

2121
export interface Options<T, U, E> {
2222
params?: U;
23-
fetchOptions?: ApiFetchOptions<T, E>;
23+
options?: ApiFetchOptions<T, E>;
2424
skip?: boolean;
2525
onSuccess?: (data: T) => void;
2626
onError?: (error: E) => void;
@@ -44,7 +44,7 @@ const useLoadData = <T, U = unknown, E = string>(
4444
const [loading, setLoading] = useState<boolean>(false);
4545
const [error, setError] = useState<E>();
4646

47-
const fetchOptionsDefault: ApiFetchOptions<T, E> = {
47+
const optionsDefault: ApiFetchOptions<T, E> = {
4848
silenceErrors: true,
4949
ignoreSuccessErrors: true
5050
};
@@ -72,8 +72,8 @@ const useLoadData = <T, U = unknown, E = string>(
7272
setError(undefined);
7373

7474
const fetchOptions = {
75-
...fetchOptionsDefault,
76-
...localOptions?.fetchOptions
75+
...optionsDefault,
76+
...localOptions?.options
7777
};
7878

7979
try {

0 commit comments

Comments
 (0)