Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add events to signup for captcha results (#4712)

authored by

Hailey and committed by
GitHub
0012c6d4 a9fe87b8

+18 -5
+6
src/lib/statsig/events.ts
··· 31 31 'splash:createAccountPressed': {} 32 32 'signup:nextPressed': { 33 33 activeStep: number 34 + phoneVerificationRequired?: boolean 34 35 } 36 + 'signup:backPressed': { 37 + activeStep: number 38 + } 39 + 'signup:captchaSuccess': {} 40 + 'signup:captchaFailure': {} 35 41 'onboarding:interests:nextPressed': { 36 42 selectedInterests: string[] 37 43 selectedInterestsLength: number
+3
src/screens/Signup/StepCaptcha/index.tsx
··· 6 6 7 7 import {createFullHandle} from '#/lib/strings/handles' 8 8 import {logger} from '#/logger' 9 + import {logEvent} from 'lib/statsig/statsig' 9 10 import {ScreenTransition} from '#/screens/Login/ScreenTransition' 10 11 import {useSignupContext, useSubmitSignup} from '#/screens/Signup/state' 11 12 import {CaptchaWebView} from '#/screens/Signup/StepCaptcha/CaptchaWebView' ··· 39 40 const onSuccess = React.useCallback( 40 41 (code: string) => { 41 42 setCompleted(true) 43 + logEvent('signup:captchaSuccess', {}) 42 44 submit(code) 43 45 }, 44 46 [submit], ··· 50 52 type: 'setError', 51 53 value: _(msg`Error receiving captcha response.`), 52 54 }) 55 + logEvent('signup:captchaFailure', {}) 53 56 logger.error('Signup Flow Error', { 54 57 registrationHandle: state.handle, 55 58 error,
+9 -5
src/screens/Signup/index.tsx
··· 112 112 } 113 113 } 114 114 115 + logEvent('signup:nextPressed', { 116 + activeStep: state.activeStep, 117 + phoneVerificationRequired: 118 + state.serviceDescription?.phoneVerificationRequired, 119 + }) 120 + 115 121 // phoneVerificationRequired is actually whether a captcha is required 116 122 if ( 117 123 state.activeStep === SignupStep.HANDLE && ··· 120 126 submit() 121 127 return 122 128 } 123 - 124 129 dispatch({type: 'next'}) 125 - logEvent('signup:nextPressed', { 126 - activeStep: state.activeStep, 127 - }) 128 130 }, [ 129 131 _, 130 132 state.activeStep, ··· 144 146 registrationHandle: state.handle, 145 147 }) 146 148 } 147 - 148 149 dispatch({type: 'prev'}) 149 150 } else { 150 151 onPressBack() 151 152 } 153 + logEvent('signup:backPressed', { 154 + activeStep: state.activeStep, 155 + }) 152 156 }, [onPressBack, state.activeStep, state.handle]) 153 157 154 158 return (