File tree Expand file tree Collapse file tree
src/pages/settings/Wallet/PersonalCards/steps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,32 +6,14 @@ import ScreenWrapper from '@components/ScreenWrapper';
66import ScrollView from '@components/ScrollView' ;
77import useLocalize from '@hooks/useLocalize' ;
88import useThemeStyles from '@hooks/useThemeStyles' ;
9- import { isFullScreenName } from '@libs/Navigation/helpers/isNavigatorName' ;
10- import Navigation , { navigationRef } from '@libs/Navigation/Navigation' ;
11- import NAVIGATORS from '@src/NAVIGATORS' ;
12- import ROUTES from '@src/ROUTES' ;
9+ import Navigation from '@libs/Navigation/Navigation' ;
1310
1411function SuccessStep ( ) {
1512 const styles = useThemeStyles ( ) ;
1613 const { translate} = useLocalize ( ) ;
17- const topmostFullScreenRoute = navigationRef . current ?. getRootState ( ) ?. routes . findLast ( ( route ) => isFullScreenName ( route . name ) ) ;
18-
19- const goBack = ( ) => {
20- switch ( topmostFullScreenRoute ?. name ) {
21- case NAVIGATORS . SETTINGS_SPLIT_NAVIGATOR :
22- Navigation . goBack ( ROUTES . SETTINGS_WALLET ) ;
23- break ;
24- case NAVIGATORS . REPORTS_SPLIT_NAVIGATOR :
25- Navigation . closeRHPFlow ( ) ;
26- break ;
27- default :
28- Navigation . goBack ( ) ;
29- break ;
30- }
31- } ;
3214
3315 const exitFlow = ( ) => {
34- goBack ( ) ;
16+ Navigation . dismissModal ( ) ;
3517 } ;
3618
3719 return (
You can’t perform that action at this time.
0 commit comments