Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/libs/actions/Welcome/OnboardingFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ function getOnboardingInitialPath(getOnboardingInitialPathParams: GetOnboardingI
}

if (!isUserFromPublicDomain && hasAccessiblePolicies) {
if (onboardingInitialPath.includes(ROUTES.ONBOARDING_PRIVATE_DOMAIN.route) || onboardingInitialPath.includes(ROUTES.ONBOARDING_PERSONAL_DETAILS.route)) {
return onboardingInitialPath;
}
return `/${ROUTES.ONBOARDING_PERSONAL_DETAILS.route}`;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {resendValidateCode} from '@userActions/User';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {Route} from '@src/ROUTES';
import type {BaseOnboardingPrivateDomainProps} from './types';

function BaseOnboardingPrivateDomain({shouldUseNativeStyles, route}: BaseOnboardingPrivateDomainProps) {
Expand Down Expand Up @@ -72,7 +73,10 @@ function BaseOnboardingPrivateDomain({shouldUseNativeStyles, route}: BaseOnboard
<HeaderWithBackButton
shouldShowBackButton
progressBarPercentage={40}
onBackButtonPress={Navigation.goBack}
onBackButtonPress={() => {
const routeToNavigate = (route.params?.backTo as Route) ?? ROUTES.ONBOARDING_PERSONAL_DETAILS.getRoute();
Navigation.goBack(routeToNavigate);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from #75863. We didn’t handle the private domain case, which caused navigation to go to the wrong page.

}}
/>
<ScrollView
style={[styles.w100, styles.h100, styles.flex1]}
Expand Down