infinity-forge 9.9.3 → 9.9.4
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,3 +4,4 @@ export declare function QueryClientContextProvider({ children, queryClient, }: P
|
|
|
4
4
|
queryClient: QueryClient;
|
|
5
5
|
}>): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare function useQueryClient(): QueryClient;
|
|
7
|
+
export declare function useQueryClient<SelectorReturn>(selector: (client: QueryClient) => SelectorReturn): SelectorReturn;
|
|
@@ -9,11 +9,11 @@ function QueryClientContextProvider(_a) {
|
|
|
9
9
|
var children = _a.children, queryClient = _a.queryClient;
|
|
10
10
|
return ((0, jsx_runtime_1.jsx)(QueryClientContext.Provider, { value: { queryClient: queryClient }, children: children }));
|
|
11
11
|
}
|
|
12
|
-
function useQueryClient() {
|
|
12
|
+
function useQueryClient(selector) {
|
|
13
13
|
var context = (0, react_1.useContext)(QueryClientContext);
|
|
14
14
|
if (!context) {
|
|
15
15
|
throw new Error("Missing QueryClientContext.Provider");
|
|
16
16
|
}
|
|
17
|
-
return context.queryClient;
|
|
17
|
+
return selector ? selector(context.queryClient) : context.queryClient;
|
|
18
18
|
}
|
|
19
19
|
//# sourceMappingURL=QueryClientProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryClientProvider.js","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-query/new-query/QueryClientProvider.tsx"],"names":[],"mappings":";;AASA,gEASC;
|
|
1
|
+
{"version":3,"file":"QueryClientProvider.js","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-query/new-query/QueryClientProvider.tsx"],"names":[],"mappings":";;AASA,gEASC;AAKD,wCASC;;AAhCD,+BAAsE;AAOtE,IAAM,kBAAkB,GAAG,IAAA,qBAAa,EAAgC,IAAI,CAAC,CAAC;AAE9E,SAAgB,0BAA0B,CAAC,EAGO;QAFhD,QAAQ,cAAA,EACR,WAAW,iBAAA;IAEX,OAAO,CACL,uBAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,WAAW,aAAA,EAAE,YAChD,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC;AAKD,SAAgB,cAAc,CAC5B,QAAkD;IAElD,IAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,kBAAkB,CAAC,CAAC;IAC/C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AACxE,CAAC"}
|