1- import React , { useCallback , useContext , useEffect , useMemo , useRef , useState } from 'react' ;
1+ import React , { useCallback , useContext , useEffect , useMemo , useState } from 'react' ;
22import { InteractionManager , View } from 'react-native' ;
33import Button from '@components/Button' ;
44import Checkbox from '@components/Checkbox' ;
@@ -63,7 +63,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
6363 const { isOffline} = useNetwork ( ) ;
6464 const isLoading = onboarding ?. isLoading ;
6565 const prevIsLoading = usePrevious ( isLoading ) ;
66- const didOpenOldDotLink = useRef ( false ) ;
6766
6867 const features : Feature [ ] = useMemo ( ( ) => {
6968 return [
@@ -148,7 +147,7 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
148147 } , [ paidGroupPolicy , onboardingPolicyID ] ) ;
149148
150149 useEffect ( ( ) => {
151- if ( ! ! isLoading || ! prevIsLoading || didOpenOldDotLink . current ) {
150+ if ( ! ! isLoading || ! prevIsLoading ) {
152151 return ;
153152 }
154153
@@ -158,7 +157,6 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
158157 return ;
159158 }
160159 waitForIdle ( ) . then ( ( ) => {
161- didOpenOldDotLink . current = true ;
162160 openOldDotLink ( CONST . OLDDOT_URLS . INBOX , true ) ;
163161 } ) ;
164162 } , [ isLoading , prevIsLoading , setRootStatusBarEnabled ] ) ;
@@ -214,12 +212,10 @@ function BaseOnboardingInterestedFeatures({shouldUseNativeStyles}: BaseOnboardin
214212 } ) ;
215213
216214 if ( shouldOnboardingRedirectToOldDot ( onboardingCompanySize , newUserReportedIntegration ) ) {
217- if ( CONFIG . IS_HYBRID_APP || didOpenOldDotLink . current ) {
215+ if ( CONFIG . IS_HYBRID_APP ) {
218216 return ;
219217 }
220- didOpenOldDotLink . current = true ;
221218 openOldDotLink ( CONST . OLDDOT_URLS . INBOX , true ) ;
222- return ;
223219 }
224220
225221 // Avoid creating new WS because onboardingPolicyID is cleared before unmounting
0 commit comments