Skip to content

Commit

Permalink
remove ExitSurvey from HybridApp
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Aug 26, 2024
1 parent c6cf1bf commit 643bff5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ function ExitSurveyConfirmPage({exitReason, route, navigation}: ExitSurveyConfir
text={translate('exitSurvey.goToExpensifyClassic')}
onPress={() => {
ExitSurvey.switchToOldDot();
if (NativeModules.HybridAppModule) {
Navigation.resetToHome();
NativeModules.HybridAppModule.closeReactNativeApp(false);
return;
}
Navigation.dismissModal();
Link.openOldDotLink(CONST.OLDDOT_URLS.INBOX);
}}
Expand Down
13 changes: 11 additions & 2 deletions src/pages/settings/InitialSettingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {useRoute} from '@react-navigation/native';
import React, {useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState} from 'react';
// eslint-disable-next-line no-restricted-imports
import type {GestureResponderEvent, ScrollView as RNScrollView, ScrollViewProps, StyleProp, ViewStyle} from 'react-native';
import {View} from 'react-native';
import {NativeModules, View} from 'react-native';
import type {OnyxCollection, OnyxEntry} from 'react-native-onyx';
import {useOnyx, withOnyx} from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
Expand Down Expand Up @@ -148,7 +148,16 @@ function InitialSettingsPage({session, userWallet, bankAccountList, fundList, wa
{
translationKey: 'exitSurvey.goToExpensifyClassic',
icon: Expensicons.ExpensifyLogoNew,
routeName: ROUTES.SETTINGS_EXIT_SURVEY_REASON,
...(NativeModules.HybridAppModule
? {
action: () => {
Navigation.resetToHome();
NativeModules.HybridAppModule.closeReactNativeApp(false);
},
}
: {
route: ROUTES.SETTINGS_EXIT_SURVEY_REASON,
}),
},
{
translationKey: 'common.profile',
Expand Down

0 comments on commit 643bff5

Please sign in to comment.