Skip to content

Commit

Permalink
skip captcha on dev mode and refetch setting on phone change
Browse files Browse the repository at this point in the history
  • Loading branch information
ofekrotem committed Sep 9, 2024
1 parent 1b89bf3 commit 10713c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/client/Locomotion/src/pages/Profile/Phone.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Phone = ({ navigation }) => {
};
useEffect(() => {
fetchHideCaptchaSetting();
}, []);
}, [user?.phoneNumber]);


const onVerifyCaptcha = async (verifiedCaptchaToken) => {
Expand Down Expand Up @@ -94,7 +94,9 @@ const Phone = ({ navigation }) => {
};
useEffect(() => {
if (isLoadingSaveButton) {
if (!shouldHideCaptcha && Config.CAPTCHA_KEY && recaptchaRef.current) {
if (
!shouldHideCaptcha && Config.CAPTCHA_KEY && recaptchaRef.curren && !isDebugPhoneNumber()
) {
recaptchaRef.current.open();
} else {
Mixpanel.setEvent('Submit phone number, without captcha , (Config.CAPTCHA_KEY is not defined)');
Expand Down

0 comments on commit 10713c3

Please sign in to comment.