File tree Expand file tree Collapse file tree
src/pages/OnboardingWorkEmail Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useFocusEffect } from '@react-navigation/native' ;
22import React , { useCallback } from 'react' ;
33import { BackHandler } from 'react-native' ;
4+ import { translateLocal } from '@libs/Localize' ;
5+ import { setOnboardingErrorMessage } from '@userActions/Welcome' ;
46import BaseOnboardingWorkEmail from './BaseOnboardingWorkEmail' ;
57import type { OnboardingWorkEmailProps } from './types' ;
68
@@ -9,7 +11,10 @@ function OnboardingWorkEmail(props: OnboardingWorkEmailProps) {
911 useFocusEffect (
1012 useCallback ( ( ) => {
1113 // Return true to indicate that the back button press is handled here
12- const backAction = ( ) => true ;
14+ const backAction = ( ) => {
15+ setOnboardingErrorMessage ( translateLocal ( 'onboarding.purpose.errorBackButton' ) ) ;
16+ return true ;
17+ } ;
1318
1419 const backHandler = BackHandler . addEventListener ( 'hardwareBackPress' , backAction ) ;
1520
You can’t perform that action at this time.
0 commit comments