Skip to content

Commit

Permalink
Merge pull request #880 from CruGlobal/auth-flow-fix
Browse files Browse the repository at this point in the history
authFlowGenerator fix
  • Loading branch information
reldredge71 authored Mar 29, 2019
2 parents ecf90de + 8a2a080 commit ea7a07e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/routes/auth/authFlowGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ export const authFlowGenerator = ({
completeAction,
includeSignUp = true,
}) => ({
...(includeSignUp && {
[SIGN_UP_SCREEN]: buildTrackedScreen(
wrapNextAction(
SignUpScreen,
({ signIn } = {}) =>
signIn ? navigatePush(SIGN_IN_SCREEN) : completeAction,
),
buildTrackingObj('auth', 'auth'),
),
}),
...(includeSignUp
? {
[SIGN_UP_SCREEN]: buildTrackedScreen(
wrapNextAction(
SignUpScreen,
({ signIn } = {}) =>
signIn ? navigatePush(SIGN_IN_SCREEN) : completeAction,
),
buildTrackingObj('auth', 'auth'),
),
}
: {}),
[SIGN_IN_SCREEN]: buildTrackedScreen(
wrapNextAction(
SignInScreen,
Expand Down

0 comments on commit ea7a07e

Please sign in to comment.