Skip to content

Commit 918a458

Browse files
luacmartinsOSBotify
authored andcommitted
Merge pull request #89303 from Expensify/arosiclair-onboarding-transition
Fix onboarding not showing after OD to ND transition (cherry picked from commit 9eab883) (cherry-picked to staging by arosiclair)
1 parent 061a91b commit 918a458

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

src/hooks/useOnboardingFlow.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ function useOnboardingFlowRouter() {
4242

4343
const [isSingleNewDotEntry, isSingleNewDotEntryMetadata] = useOnyx(ONYXKEYS.HYBRID_APP, {selector: isSingleNewDotEntrySelector});
4444

45-
useEffect(() => {
46-
const isOnboardingCompleted = hasCompletedGuidedSetupFlowSelector(onboardingValues);
45+
const isOnboardingCompleted = hasCompletedGuidedSetupFlowSelector(onboardingValues);
4746

47+
useEffect(() => {
4848
// This should delay opening the onboarding modal so it does not interfere with the ongoing ReportScreen params changes
4949
// eslint-disable-next-line @typescript-eslint/no-deprecated
5050
const handle = InteractionManager.runAfterInteractions(() => {
@@ -65,11 +65,6 @@ function useOnboardingFlowRouter() {
6565
return;
6666
}
6767

68-
if (currentUrl.endsWith('/r')) {
69-
// Don't trigger onboarding if we are in the middle of a redirect to a report
70-
return;
71-
}
72-
7368
if (CONFIG.IS_HYBRID_APP) {
7469
// For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
7570
if (isSingleNewDotEntry) {
@@ -133,6 +128,7 @@ function useOnboardingFlowRouter() {
133128
hasBeenAddedToNudgeMigration,
134129
hasNonPersonalPolicy,
135130
wasInvitedToNewDot,
131+
isOnboardingCompleted,
136132
]);
137133

138134
return {

0 commit comments

Comments
 (0)