File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import {setSelfTourViewed} from '@libs/actions/Welcome';
1717import { getTestDriveURL } from '@libs/TourUtils' ;
1818import CONST from '@src/CONST' ;
1919import ONYXKEYS from '@src/ONYXKEYS' ;
20- import { hasSeenTourSelector } from '@src/selectors/Onboarding' ;
2120
2221const MAX_NUMBER_OF_LINES_TITLE = 4 ;
2322
@@ -35,15 +34,15 @@ function DiscoverSection() {
3534 hasOutstandingChildTask,
3635 } = useOnboardingTaskInformation ( CONST . ONBOARDING_TASK_TYPE . VIEW_TOUR ) ;
3736 const parentReportAction = useParentReportAction ( viewTourTaskReport ) ;
38- const [ hasSeenTour = true ] = useOnyx ( ONYXKEYS . NVP_ONBOARDING , { selector : hasSeenTourSelector } ) ;
37+ const [ onboarding ] = useOnyx ( ONYXKEYS . NVP_ONBOARDING ) ;
38+
39+ if ( onboarding ?. selfTourViewed !== false || ! onboarding ) {
40+ return null ;
41+ }
3942
4043 const handlePress = ( ) => {
4144 Linking . openURL ( getTestDriveURL ( shouldUseNarrowLayout , introSelected , isCurrentUserPolicyAdmin ) ) ;
4245
43- if ( hasSeenTour ) {
44- return ;
45- }
46-
4746 if ( viewTourTaskReport && viewTourTaskReport . stateNum !== CONST . REPORT . STATE_NUM . APPROVED ) {
4847 completeTestDriveTask (
4948 viewTourTaskReport ,
You can’t perform that action at this time.
0 commit comments