@ventlio/tanstack-query 0.2.16 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,9 +4,7 @@ var reactQuery = require('@tanstack/react-query');
|
|
|
4
4
|
|
|
5
5
|
const useQueryConfig = () => {
|
|
6
6
|
const queryClient = reactQuery.useQueryClient();
|
|
7
|
-
const { headers = {}, baseURL = '', timeout = 10000, } = queryClient.getQueryData([
|
|
8
|
-
'config',
|
|
9
|
-
]);
|
|
7
|
+
const { headers = {}, baseURL = '', timeout = 10000, } = queryClient.getQueryData(['config']) ?? {};
|
|
10
8
|
return { headers, baseURL, timeout };
|
|
11
9
|
};
|
|
12
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQueryConfig.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useQueryConfig.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -4,9 +4,7 @@ import axios from 'axios';
|
|
|
4
4
|
|
|
5
5
|
const useQueryConfig = () => {
|
|
6
6
|
const queryClient = useQueryClient();
|
|
7
|
-
const { headers = {}, baseURL = '', timeout = 10000, } = queryClient.getQueryData([
|
|
8
|
-
'config',
|
|
9
|
-
]);
|
|
7
|
+
const { headers = {}, baseURL = '', timeout = 10000, } = queryClient.getQueryData(['config']) ?? {};
|
|
10
8
|
return { headers, baseURL, timeout };
|
|
11
9
|
};
|
|
12
10
|
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -8,9 +8,7 @@ export const useQueryConfig = (): TanstackQueryConfig => {
|
|
|
8
8
|
headers = {},
|
|
9
9
|
baseURL = '',
|
|
10
10
|
timeout = 10000,
|
|
11
|
-
} = queryClient.getQueryData<TanstackQueryConfig>([
|
|
12
|
-
'config',
|
|
13
|
-
]) as TanstackQueryConfig;
|
|
11
|
+
} = queryClient.getQueryData<TanstackQueryConfig>(['config']) ?? {};
|
|
14
12
|
|
|
15
13
|
return { headers, baseURL, timeout };
|
|
16
14
|
};
|