@@ -24,6 +24,7 @@ import ROUTES from '@src/ROUTES';
2424import type SCREENS from '@src/SCREENS' ;
2525import type { ExitSurveyReasonForm } from '@src/types/form/ExitSurveyReasonForm' ;
2626import EXIT_SURVEY_REASON_INPUT_IDS from '@src/types/form/ExitSurveyReasonForm' ;
27+ import RESPONSE_INPUT_IDS from '@src/types/form/ExitSurveyResponseForm' ;
2728import { isEmptyObject } from '@src/types/utils/EmptyObject' ;
2829import ExitSurveyOffline from './ExitSurveyOffline' ;
2930
@@ -38,6 +39,10 @@ function ExitSurveyConfirmPage({route, navigation}: ExitSurveyConfirmPageProps)
3839 selector : ( value : OnyxEntry < ExitSurveyReasonForm > ) => value ?. [ EXIT_SURVEY_REASON_INPUT_IDS . REASON ] ?? null ,
3940 canBeMissing : true ,
4041 } ) ;
42+ const [ exitSurveyResponse ] = useOnyx ( ONYXKEYS . FORMS . EXIT_SURVEY_RESPONSE_FORM , {
43+ selector : ( value ) => value ?. [ RESPONSE_INPUT_IDS . RESPONSE ] ,
44+ canBeMissing : true ,
45+ } ) ;
4146 const shouldShowQuickTips =
4247 isEmptyObject ( tryNewDot ) || tryNewDot ?. classicRedirect ?. dismissed === true || ( ! isEmptyObject ( tryNewDot ) && tryNewDot ?. classicRedirect ?. dismissed === undefined ) ;
4348
@@ -90,7 +95,7 @@ function ExitSurveyConfirmPage({route, navigation}: ExitSurveyConfirmPageProps)
9095 text = { translate ( shouldShowQuickTips ? 'exitSurvey.takeMeToExpensifyClassic' : 'exitSurvey.goToExpensifyClassic' ) }
9196 pressOnEnter
9297 onPress = { ( ) => {
93- switchToOldDot ( ) ;
98+ switchToOldDot ( exitReason , exitSurveyResponse ) ;
9499 Navigation . dismissModal ( ) ;
95100 openOldDotLink ( CONST . OLDDOT_URLS . INBOX , true ) ;
96101 } }
0 commit comments