Skip to content

Commit 26154a1

Browse files
committed
Fix TS
1 parent caa6b29 commit 26154a1

3 files changed

Lines changed: 3 additions & 13 deletions

File tree

src/libs/actions/Tour.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import {InteractionManager} from 'react-native';
2-
import type {OnyxEntry} from 'react-native-onyx';
32
import Navigation from '@libs/Navigation/Navigation';
43
import CONST from '@src/CONST';
54
import ROUTES from '@src/ROUTES';
6-
import type {Report} from '@src/types/onyx';
75
import type {IntroSelected} from './Report';
86
import {completeTestDriveTask} from './Task';
97

108
function startTestDrive(
119
introSelected: IntroSelected | undefined,
12-
viewTourReport: OnyxEntry<Report>,
13-
viewTourReportID: string | undefined,
1410
shouldUpdateSelfTourViewedOnlyLocally = false,
1511
hasUserBeenAddedToNudgeMigration = false,
1612
) {
@@ -22,7 +18,7 @@ function startTestDrive(
2218
introSelected?.choice === CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE ||
2319
(introSelected?.choice === CONST.ONBOARDING_CHOICES.SUBMIT && introSelected.inviteType === CONST.ONBOARDING_INVITE_TYPES.WORKSPACE)
2420
) {
25-
completeTestDriveTask(viewTourReport, viewTourReportID, shouldUpdateSelfTourViewedOnlyLocally);
21+
completeTestDriveTask(shouldUpdateSelfTourViewedOnlyLocally);
2622
Navigation.navigate(ROUTES.TEST_DRIVE_DEMO_ROOT);
2723
} else {
2824
Navigation.navigate(ROUTES.TEST_DRIVE_MODAL_ROOT.route);

src/pages/Search/EmptySearchView.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ function EmptySearchView({hash, type, groupBy, hasResults}: EmptySearchViewProps
164164
selector: hasSeenTourSelector,
165165
canBeMissing: true,
166166
});
167-
const viewTourReportID = introSelected?.viewTour;
168-
const [viewTourReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${viewTourReportID}`, {canBeMissing: true});
169167

170168
// Default 'Folder' lottie animation, along with its background styles
171169
const defaultViewItemHeader = useMemo(
@@ -198,7 +196,7 @@ function EmptySearchView({hash, type, groupBy, hasResults}: EmptySearchViewProps
198196
}
199197

200198
const startTestDriveAction = () => {
201-
startTestDrive(introSelected, viewTourReport, viewTourReportID, false, tryNewDot?.hasBeenAddedToNudgeMigration);
199+
startTestDrive(introSelected, false, tryNewDot?.hasBeenAddedToNudgeMigration);
202200
};
203201

204202
// If we are grouping by reports, show a custom message rather than a type-specific message
@@ -371,8 +369,6 @@ function EmptySearchView({hash, type, groupBy, hasResults}: EmptySearchViewProps
371369
tripViewChildren,
372370
shouldRedirectToExpensifyClassic,
373371
transactions,
374-
viewTourReport,
375-
viewTourReportID,
376372
tryNewDot?.hasBeenAddedToNudgeMigration,
377373
]);
378374

src/pages/home/sidebar/FloatingActionButtonAndPopover.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
135135
selector: hasSeenTourSelector,
136136
canBeMissing: true,
137137
});
138-
const viewTourReportID = introSelected?.viewTour;
139-
const [viewTourReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${viewTourReportID}`, {canBeMissing: true});
140138
const [tryNewDot] = useOnyx(ONYXKEYS.NVP_TRY_NEW_DOT, {selector: tryNewDotOnyxSelector, canBeMissing: true});
141139

142140
const groupPoliciesWithChatEnabled = getGroupPaidPoliciesWithExpenseChatEnabled();
@@ -529,7 +527,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
529527
iconFill: theme.icon,
530528
text: translate('testDrive.quickAction.takeATwoMinuteTestDrive'),
531529
onSelected: () =>
532-
interceptAnonymousUser(() => startTestDrive(introSelected, viewTourReport, viewTourReportID, isAnonymousUser(), tryNewDot?.hasBeenAddedToNudgeMigration)),
530+
interceptAnonymousUser(() => startTestDrive(introSelected, isAnonymousUser(), tryNewDot?.hasBeenAddedToNudgeMigration)),
533531
},
534532
]
535533
: []),

0 commit comments

Comments
 (0)