@@ -177,24 +177,24 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
177177 const styles = useThemeStyles ( ) ;
178178 const theme = useTheme ( ) ;
179179 const { translate} = useLocalize ( ) ;
180- const [ isLoading = false ] = useOnyx ( ONYXKEYS . IS_LOADING_APP ) ;
181- const [ personalDetails ] = useOnyx ( ONYXKEYS . PERSONAL_DETAILS_LIST ) ;
182- const [ session ] = useOnyx ( ONYXKEYS . SESSION ) ;
183- const [ quickAction ] = useOnyx ( ONYXKEYS . NVP_QUICK_ACTION_GLOBAL_CREATE ) ;
184- const [ quickActionReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ quickAction ?. chatReportID } ` ) ;
185- const [ reportNameValuePairs ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT_NAME_VALUE_PAIRS } ${ quickActionReport ?. reportID } ` ) ;
186- const [ activePolicyID ] = useOnyx ( ONYXKEYS . NVP_ACTIVE_POLICY_ID ) ;
187- const [ allReports ] = useOnyx ( ONYXKEYS . COLLECTION . REPORT ) ;
188- const [ activePolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ activePolicyID } ` ) ;
180+ const [ isLoading = false ] = useOnyx ( ONYXKEYS . IS_LOADING_APP , { canBeMissing : false } ) ;
181+ const [ personalDetails ] = useOnyx ( ONYXKEYS . PERSONAL_DETAILS_LIST , { canBeMissing : false } ) ;
182+ const [ session ] = useOnyx ( ONYXKEYS . SESSION , { canBeMissing : false } ) ;
183+ const [ quickAction ] = useOnyx ( ONYXKEYS . NVP_QUICK_ACTION_GLOBAL_CREATE , { canBeMissing : true } ) ;
184+ const [ quickActionReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ quickAction ?. chatReportID } ` , { canBeMissing : true } ) ;
185+ const [ reportNameValuePairs ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT_NAME_VALUE_PAIRS } ${ quickActionReport ?. reportID } ` , { canBeMissing : true } ) ;
186+ const [ activePolicyID ] = useOnyx ( ONYXKEYS . NVP_ACTIVE_POLICY_ID , { canBeMissing : false } ) ;
187+ const [ allReports ] = useOnyx ( ONYXKEYS . COLLECTION . REPORT , { canBeMissing : false } ) ;
188+ const [ activePolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ activePolicyID } ` , { canBeMissing : false } ) ;
189189 const policyChatForActivePolicy = useMemo ( ( ) => {
190190 if ( isEmptyObject ( activePolicy ) || ! activePolicy ?. isPolicyExpenseChatEnabled ) {
191191 return { } as OnyxTypes . Report ;
192192 }
193193 const policyChatsForActivePolicy = getWorkspaceChats ( `${ activePolicyID ?? CONST . DEFAULT_NUMBER_ID } ` , [ session ?. accountID ?? CONST . DEFAULT_NUMBER_ID ] , allReports ) ;
194194 return policyChatsForActivePolicy . length > 0 ? policyChatsForActivePolicy . at ( 0 ) : ( { } as OnyxTypes . Report ) ;
195195 } , [ activePolicy , activePolicyID , session ?. accountID , allReports ] ) ;
196- const [ quickActionPolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ quickActionReport ?. policyID } ` ) ;
197- const [ allPolicies ] = useOnyx ( ONYXKEYS . COLLECTION . POLICY , { selector : ( c ) => mapOnyxCollectionItems ( c , policySelector ) } ) ;
196+ const [ quickActionPolicy ] = useOnyx ( `${ ONYXKEYS . COLLECTION . POLICY } ${ quickActionReport ?. policyID } ` , { canBeMissing : true } ) ;
197+ const [ allPolicies ] = useOnyx ( ONYXKEYS . COLLECTION . POLICY , { selector : ( c ) => mapOnyxCollectionItems ( c , policySelector ) , canBeMissing : false } ) ;
198198 const currentUserPersonalDetails = useCurrentUserPersonalDetails ( ) ;
199199 const { canUseLeftHandBar} = usePermissions ( ) ;
200200
@@ -207,18 +207,19 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
207207 const prevIsFocused = usePrevious ( isFocused ) ;
208208 const { isOffline} = useNetwork ( ) ;
209209 const { isBlockedFromSpotnanaTravel} = usePermissions ( ) ;
210- const [ primaryLogin ] = useOnyx ( ONYXKEYS . ACCOUNT , { selector : ( account ) => account ?. primaryLogin } ) ;
210+ const [ primaryLogin ] = useOnyx ( ONYXKEYS . ACCOUNT , { selector : ( account ) => account ?. primaryLogin , canBeMissing : false } ) ;
211211 const primaryContactMethod = primaryLogin ?? session ?. email ?? '' ;
212- const [ travelSettings ] = useOnyx ( ONYXKEYS . NVP_TRAVEL_SETTINGS ) ;
212+ const [ travelSettings ] = useOnyx ( ONYXKEYS . NVP_TRAVEL_SETTINGS , { canBeMissing : true } ) ;
213213
214214 const { canUseSpotnanaTravel, canUseTableReportView} = usePermissions ( ) ;
215215 const canSendInvoice = useMemo ( ( ) => canSendInvoicePolicyUtils ( allPolicies as OnyxCollection < OnyxTypes . Policy > , session ?. email ) , [ allPolicies , session ?. email ] ) ;
216216 const isValidReport = ! ( isEmptyObject ( quickActionReport ) || isArchivedReport ( reportNameValuePairs ) ) ;
217217 const { environment} = useEnvironment ( ) ;
218- const [ introSelected ] = useOnyx ( ONYXKEYS . NVP_INTRO_SELECTED ) ;
218+ const [ introSelected ] = useOnyx ( ONYXKEYS . NVP_INTRO_SELECTED , { canBeMissing : false } ) ;
219219 const navatticURL = getNavatticURL ( environment , introSelected ?. choice ) ;
220220 const [ hasSeenTour = false ] = useOnyx ( ONYXKEYS . NVP_ONBOARDING , {
221221 selector : hasSeenTourSelector ,
222+ canBeMissing : false ,
222223 } ) ;
223224
224225 const { setRootStatusBarEnabled} = useContext ( CustomStatusBarAndBackgroundContext ) ;
@@ -470,7 +471,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
470471 ] ) ;
471472
472473 const viewTourTaskReportID = introSelected ?. viewTour ;
473- const [ viewTourTaskReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ viewTourTaskReportID } ` ) ;
474+ const [ viewTourTaskReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ viewTourTaskReportID } ` , { canBeMissing : false } ) ;
474475
475476 const canModifyTask = canModifyTaskUtils ( viewTourTaskReport , currentUserPersonalDetails . accountID ) ;
476477 const canActionTask = canActionTaskUtils ( viewTourTaskReport , currentUserPersonalDetails . accountID ) ;
@@ -581,8 +582,8 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
581582 icon : Expensicons . Binoculars ,
582583 iconStyles : styles . popoverIconCircle ,
583584 iconFill : theme . icon ,
584- text : translate ( 'tour.takeATwoMinuteTour ' ) ,
585- description : translate ( 'tour .exploreExpensify' ) ,
585+ text : translate ( 'testDrive.quickAction.takeATwoMinuteTestDrive ' ) ,
586+ description : translate ( 'testDrive.quickAction .exploreExpensify' ) ,
586587 onSelected : ( ) => {
587588 openExternalLink ( navatticURL ) ;
588589 setSelfTourViewed ( isAnonymousUser ( ) ) ;
0 commit comments