From 0012c6d40f63ad6ee1dd1fe13d5b56b4e9006425 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Mon, 1 Jul 2024 15:11:04 -0700
Subject: Add events to signup for captcha results (#4712)

---
 src/screens/Signup/index.tsx | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'src/screens/Signup/index.tsx')

diff --git a/src/screens/Signup/index.tsx b/src/screens/Signup/index.tsx
index 8d1546fbc..f7ca180bf 100644
--- a/src/screens/Signup/index.tsx
+++ b/src/screens/Signup/index.tsx
@@ -112,6 +112,12 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
       }
     }
 
+    logEvent('signup:nextPressed', {
+      activeStep: state.activeStep,
+      phoneVerificationRequired:
+        state.serviceDescription?.phoneVerificationRequired,
+    })
+
     // phoneVerificationRequired is actually whether a captcha is required
     if (
       state.activeStep === SignupStep.HANDLE &&
@@ -120,11 +126,7 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
       submit()
       return
     }
-
     dispatch({type: 'next'})
-    logEvent('signup:nextPressed', {
-      activeStep: state.activeStep,
-    })
   }, [
     _,
     state.activeStep,
@@ -144,11 +146,13 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
           registrationHandle: state.handle,
         })
       }
-
       dispatch({type: 'prev'})
     } else {
       onPressBack()
     }
+    logEvent('signup:backPressed', {
+      activeStep: state.activeStep,
+    })
   }, [onPressBack, state.activeStep, state.handle])
 
   return (
-- 
cgit 1.4.1

