rankrunners-cms 0.0.25 → 0.0.26
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/package.json +1 -1
- package/src/captcha/types.ts +1 -0
- package/src/captcha/use-cap.ts +7 -0
package/package.json
CHANGED
package/src/captcha/types.ts
CHANGED
package/src/captcha/use-cap.ts
CHANGED
|
@@ -235,12 +235,19 @@ export function useCaptcha(props: CapHookProps = {}): UseCaptcha {
|
|
|
235
235
|
|
|
236
236
|
const solvingCaptcha = solving || waitingForRetry;
|
|
237
237
|
|
|
238
|
+
const consumeCaptchaToken = useCallback(() => {
|
|
239
|
+
const currentToken = token;
|
|
240
|
+
reset();
|
|
241
|
+
return currentToken;
|
|
242
|
+
}, [token, reset]);
|
|
243
|
+
|
|
238
244
|
return {
|
|
239
245
|
captchaToken: token?.token ?? null,
|
|
240
246
|
solvingCaptcha,
|
|
241
247
|
captchaError: solvingCaptcha ? null : error,
|
|
242
248
|
captchaProgress: progress,
|
|
243
249
|
resetCaptcha: reset,
|
|
250
|
+
consumeCaptchaToken,
|
|
244
251
|
};
|
|
245
252
|
}
|
|
246
253
|
|