Skip to content

Commit

Permalink
Merge pull request #54921 from rayane-djouah/fix-54915
Browse files Browse the repository at this point in the history
Fix: We're playing and showing the "Welcome to Expensify" modal/video when newly migrated users come over
(cherry picked from commit 5ca82b8)

(CP triggered by thienlnam)
  • Loading branch information
puneetlath authored and OSBotify committed Jan 8, 2025
1 parent c487381 commit 95127d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/ExplanationModal.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import React from 'react';
import {useOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import * as Welcome from '@userActions/Welcome';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import FeatureTrainingModal from './FeatureTrainingModal';

function ExplanationModal() {
const {translate} = useLocalize();
const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRYNEWDOT);
const hasBeenAddedToNudgeMigration = !!tryNewDot?.nudgeMigration?.timestamp;

if (hasBeenAddedToNudgeMigration) {
return null;
}

return (
<FeatureTrainingModal
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 95127d3

Please sign in to comment.