@hipnation-truth/sdk 0.26.9 → 0.26.10
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/react.js +8 -2
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -2293,10 +2293,16 @@ function TruthProvider({
|
|
|
2293
2293
|
const url = resolveConvexUrl(environment, convexUrl);
|
|
2294
2294
|
const resolvedApiBaseUrl = (_a = apiBaseUrl != null ? apiBaseUrl : readEnv("EXPO_PUBLIC_TRUTH_API_BASE_URL")) != null ? _a : resolveApiBaseUrl(environment);
|
|
2295
2295
|
const resolvedApiKey = (_b = apiKey != null ? apiKey : readEnv("EXPO_PUBLIC_TRUTH_API_KEY")) != null ? _b : "";
|
|
2296
|
-
const
|
|
2296
|
+
const hasAuthFetcher = Boolean(getAuthToken);
|
|
2297
|
+
const convexClient = (0, import_react2.useMemo)(
|
|
2298
|
+
() => new import_react.ConvexReactClient(
|
|
2299
|
+
url,
|
|
2300
|
+
hasAuthFetcher ? { expectAuth: true } : void 0
|
|
2301
|
+
),
|
|
2302
|
+
[url, hasAuthFetcher]
|
|
2303
|
+
);
|
|
2297
2304
|
const getAuthTokenRef = (0, import_react2.useRef)(getAuthToken);
|
|
2298
2305
|
getAuthTokenRef.current = getAuthToken;
|
|
2299
|
-
const hasAuthFetcher = Boolean(getAuthToken);
|
|
2300
2306
|
const stableGetAuthToken = (0, import_react2.useMemo)(
|
|
2301
2307
|
() => hasAuthFetcher ? (opts) => __async(null, null, function* () {
|
|
2302
2308
|
var _a2, _b2;
|