Skip to content

Commit

Permalink
add early return if hasBeenAddedToNudgeMigration
Browse files Browse the repository at this point in the history
  • Loading branch information
rayane-djouah committed Jan 8, 2025
1 parent 6fc7cf5 commit bbd2e57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/ExplanationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function ExplanationModal() {
const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRYNEWDOT);
const hasBeenAddedToNudgeMigration = !!tryNewDot?.nudgeMigration?.timestamp;

// If the user has already seen the welcome video, don't show it again
if (hasBeenAddedToNudgeMigration) {
return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/useOnboardingFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ function useOnboardingFlowRouter() {
return;
}

if (hasBeenAddedToNudgeMigration) {
return;
}

if (NativeModules.HybridAppModule) {
// For single entries, such as using the Travel feature from OldDot, we don't want to show onboarding
if (isSingleNewDotEntry) {
Expand Down

0 comments on commit bbd2e57

Please sign in to comment.