@turtleclub/hooks 0.5.0-beta.93 → 0.5.0-beta.94
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.
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/v2/geocheck/hooks.ts +5 -4
- package/src/v2/lib/api-client.ts +1 -0
- package/src/v2/lib/turtle-provider.tsx +2 -1
package/dist/index.cjs
CHANGED
|
@@ -4469,10 +4469,12 @@ function useWidgetOpportunities(distributorId) {
|
|
|
4469
4469
|
var import_react_query17 = require("@tanstack/react-query");
|
|
4470
4470
|
function useGeocheck(options = {}) {
|
|
4471
4471
|
const { enabled = true, staleTime, gcTime } = options;
|
|
4472
|
+
const { disableGeocheck } = apiClient.getConfig();
|
|
4472
4473
|
return (0, import_react_query17.useQuery)({
|
|
4473
4474
|
...geocheckQueries.check,
|
|
4474
4475
|
...queryDefaults,
|
|
4475
|
-
enabled,
|
|
4476
|
+
enabled: enabled && !disableGeocheck,
|
|
4477
|
+
...disableGeocheck && { initialData: { canInteract: true } },
|
|
4476
4478
|
staleTime: staleTime ?? 5 * 60 * 1e3,
|
|
4477
4479
|
// 5 minutes
|
|
4478
4480
|
gcTime: gcTime ?? 10 * 60 * 1e3
|
|
@@ -4891,9 +4893,10 @@ function TurtleHooksProvider({
|
|
|
4891
4893
|
earnUrl,
|
|
4892
4894
|
getToken,
|
|
4893
4895
|
earnApiKey,
|
|
4894
|
-
debug
|
|
4896
|
+
debug,
|
|
4897
|
+
disableGeocheck
|
|
4895
4898
|
}) {
|
|
4896
|
-
apiClient.configure({ apiUrl, earnUrl, getToken, earnApiKey, debug });
|
|
4899
|
+
apiClient.configure({ apiUrl, earnUrl, getToken, earnApiKey, debug, disableGeocheck });
|
|
4897
4900
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
4898
4901
|
}
|
|
4899
4902
|
|