Skip to content

Commit c3a3477

Browse files
puneetlathOSBotify
authored andcommitted
Merge pull request #55005 from rayane-djouah/fix-welcome-modal-not-displaying
Fix: "Travel and expense" modal not showing for migrated users (cherry picked from commit ab139e1) (CP triggered by thienlnam)
1 parent 781ce07 commit c3a3477

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/hooks/useOnboardingFlow.ts

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue';
1616
* Warning: This hook should be used only once in the app
1717
*/
1818
function useOnboardingFlowRouter() {
19+
const [isLoadingApp] = useOnyx(ONYXKEYS.IS_LOADING_APP, {initialValue: true});
1920
const [isOnboardingCompleted, isOnboardingCompletedMetadata] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {
2021
selector: hasCompletedGuidedSetupFlowSelector,
2122
});
@@ -32,6 +33,10 @@ function useOnboardingFlowRouter() {
3233
useEffect(() => {
3334
// This should delay opening the onboarding modal so it does not interfere with the ongoing ReportScreen params changes
3435
InteractionManager.runAfterInteractions(() => {
36+
if (isLoadingApp) {
37+
return;
38+
}
39+
3540
if (isLoadingOnyxValue(isOnboardingCompletedMetadata, tryNewDotdMetadata, dismissedProductTrainingMetadata)) {
3641
return;
3742
}
@@ -76,6 +81,7 @@ function useOnboardingFlowRouter() {
7681
}
7782
});
7883
}, [
84+
isLoadingApp,
7985
isOnboardingCompleted,
8086
isHybridAppOnboardingCompleted,
8187
isOnboardingCompletedMetadata,

0 commit comments

Comments
 (0)