Skip to content

Commit

Permalink
Apply review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioh8010 committed Apr 21, 2024
1 parent 4b0354a commit 555861c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ function BottomTabBar({isLoadingApp = false}: PurposeForUsingExpensifyModalProps
}

Welcome.isOnboardingFlowCompleted({
onNotCompleted: () => Navigation.navigate(ROUTES.ONBOARDING_PURPOSE),
onNotCompleted: () =>
Navigation.navigate(
// Uncomment once Stage 1 Onboarding Flow is ready
//
// ROUTES.ONBOARDING_PERSONAL_DETAILS
//
ROUTES.ONBOARD,
),
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isLoadingApp]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
});

Navigation.dismissModal();

// Only navigate to concierge chat when central pane is visible
// Otherwise stay on the chats screen.
if (isSmallScreenWidth) {
Expand Down Expand Up @@ -110,18 +111,14 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
return errors;
};

const handleGoBack = useCallback(() => {
Navigation.goBack();
}, []);

const PersonalDetailsFooterInstance = <OfflineIndicator />;

return (
<View style={[styles.h100, styles.defaultModalContainer, shouldUseNativeStyles && styles.pt8]}>
<HeaderWithBackButton
shouldShowBackButton
progressBarPercentage={OPEN_WORK_PAGE_PURPOSES.includes(onboardingPurposeSelected ?? '') ? 50 : 75}
onBackButtonPress={handleGoBack}
onBackButtonPress={Navigation.goBack}
/>
<KeyboardAvoidingView
style={[styles.flex1, styles.dFlex]}
Expand Down
7 changes: 2 additions & 5 deletions src/pages/OnboardingWork/BaseOnboardingWork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles,
);

Navigation.dismissModal();

// Only navigate to concierge chat when central pane is visible
// Otherwise stay on the chats screen.
if (isSmallScreenWidth) {
Expand Down Expand Up @@ -89,18 +90,14 @@ function BaseOnboardingWork({currentUserPersonalDetails, shouldUseNativeStyles,
return errors;
};

const handleGoBack = useCallback(() => {
Navigation.goBack();
}, []);

const WorkFooterInstance = <OfflineIndicator />;

return (
<View style={[styles.h100, styles.defaultModalContainer, shouldUseNativeStyles && styles.pt8]}>
<HeaderWithBackButton
shouldShowBackButton
progressBarPercentage={75}
onBackButtonPress={handleGoBack}
onBackButtonPress={Navigation.goBack}
/>
<KeyboardAvoidingView
style={[styles.flex1, styles.dFlex]}
Expand Down

0 comments on commit 555861c

Please sign in to comment.