mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Remove recaptcha debug logging
This commit is contained in:
parent
8df13ee7c8
commit
d6567658c0
@ -64,9 +64,7 @@ export function RegisterPage() {
|
||||
if (isPasswordlessUser) {
|
||||
await changePassword(password);
|
||||
} else {
|
||||
console.log("executing recaptcha");
|
||||
const recaptchaResponse = await execute();
|
||||
console.log("recaptcha response", recaptchaResponse);
|
||||
await register(userName, password, recaptchaResponse);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ export function useRecaptcha(sitekey) {
|
||||
sitekey,
|
||||
size: "invisible",
|
||||
callback: (response) => {
|
||||
console.log("callback", response);
|
||||
if (promiseRef.current) {
|
||||
promiseRef.current.resolve(response);
|
||||
}
|
||||
@ -54,7 +53,6 @@ export function useRecaptcha(sitekey) {
|
||||
|
||||
const execute = useCallback(() => {
|
||||
if (!sitekey) {
|
||||
console.log("no site key");
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
@ -67,7 +65,6 @@ export function useRecaptcha(sitekey) {
|
||||
const observer = new MutationObserver((mutationsList) => {
|
||||
for (const item of mutationsList) {
|
||||
if (item.target.style?.visibility !== "visible") {
|
||||
console.log("Recaptcha dismissed");
|
||||
reject(new Error("Recaptcha dismissed"));
|
||||
observer.disconnect();
|
||||
return;
|
||||
@ -77,12 +74,10 @@ export function useRecaptcha(sitekey) {
|
||||
|
||||
promiseRef.current = {
|
||||
resolve: (value) => {
|
||||
console.log("Recaptcha resolved", value);
|
||||
resolve(value);
|
||||
observer.disconnect();
|
||||
},
|
||||
reject: (error) => {
|
||||
console.log("Recaptcha rejected", error);
|
||||
reject(error);
|
||||
observer.disconnect();
|
||||
},
|
||||
@ -104,7 +99,6 @@ export function useRecaptcha(sitekey) {
|
||||
|
||||
const reset = useCallback(() => {
|
||||
if (window.grecaptcha) {
|
||||
console.log("Recaptcha reset");
|
||||
window.grecaptcha.reset();
|
||||
}
|
||||
}, [recaptchaId]);
|
||||
|
Loading…
Reference in New Issue
Block a user