File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,9 +20,13 @@ export type OnboardingEntryDecision = {
2020 * the logged-in user, and the routing it should have driven has happened.
2121 * Call `persistOnboardingEntry` with an accepted decision.
2222 */
23- export async function decideOnboardingEntry ( ) : Promise < OnboardingEntryDecision > {
23+ export async function decideOnboardingEntry (
24+ email ?: string ,
25+ ) : Promise < OnboardingEntryDecision > {
26+ // Only used to match segment overrides, not for bucketing. An override on
27+ // another trait needs that trait passed here too.
2428 // @ts -expect-error transient is missing from the SDK's identify type
25- await flagsmith . identify ( '' , { } , true )
29+ await flagsmith . identify ( '' , email ? { email } : { } , true )
2630 const flag = flagsmith . getExperimentFlag ( 'onboarding_quickstart_flow' )
2731 const identifier = flagsmith . getContext ( ) . identity ?. identifier
2832 const variant : OnboardingVariant =
Original file line number Diff line number Diff line change @@ -163,7 +163,9 @@ const App = class extends Component {
163163 // instead of blocking the redirect.
164164 Promise . race ( [
165165 AccountStore . getUser ( ) ?. isGettingStarted
166- ? decideOnboardingEntry ( ) . catch ( ( ) => null )
166+ ? decideOnboardingEntry ( AccountStore . getUser ( ) ?. email ) . catch (
167+ ( ) => null ,
168+ )
167169 : Promise . resolve ( null ) ,
168170 new Promise ( ( resolve ) => setTimeout ( ( ) => resolve ( null ) , 2000 ) ) ,
169171 ] ) . then ( ( decision ) => {
You can’t perform that action at this time.
0 commit comments