@@ -4,6 +4,7 @@ import React, {useCallback, useEffect, useRef, useState} from 'react';
44import { InteractionManager , View } from 'react-native' ;
55import { useOnyx } from 'react-native-onyx' ;
66import type { ValueOf } from 'type-fest' ;
7+ import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView' ;
78import CheckboxWithLabel from '@components/CheckboxWithLabel' ;
89import FormProvider from '@components/Form/FormProvider' ;
910import InputWrapper from '@components/Form/InputWrapper' ;
@@ -139,64 +140,67 @@ function AccountDetailsPage() {
139140 shouldEnableMaxHeight
140141 includeSafeAreaPaddingBottom
141142 testID = { AccountDetailsPage . displayName }
143+ shouldShowOfflineIndicator = { false }
142144 >
143145 < HeaderWithBackButton
144146 title = { translate ( 'mergeAccountsPage.mergeAccount' ) }
145147 onBackButtonPress = { ( ) => Navigation . dismissModal ( ) }
146148 shouldDisplayHelpButton = { false }
147149 />
148- < FormProvider
149- formID = { ONYXKEYS . FORMS . MERGE_ACCOUNT_DETAILS_FORM }
150- onSubmit = { ( values ) => {
151- requestValidationCodeForAccountMerge ( values [ INPUT_IDS . PHONE_OR_EMAIL ] ) ;
152- } }
153- style = { [ styles . flexGrow1 , styles . mh5 ] }
154- shouldTrimValues
155- validate = { validate }
156- submitButtonText = { translate ( 'common.next' ) }
157- isSubmitButtonVisible = { false }
158- ref = { formRef }
159- >
160- < View style = { [ styles . flexGrow1 , styles . mt3 ] } >
161- < View >
162- < Text >
163- { translate ( 'mergeAccountsPage.accountDetails.accountToMergeInto' ) }
164- < Text style = { styles . textStrong } > { userEmailOrPhone } </ Text >
165- </ Text >
150+ < FullPageOfflineBlockingView >
151+ < FormProvider
152+ formID = { ONYXKEYS . FORMS . MERGE_ACCOUNT_DETAILS_FORM }
153+ onSubmit = { ( values ) => {
154+ requestValidationCodeForAccountMerge ( values [ INPUT_IDS . PHONE_OR_EMAIL ] ) ;
155+ } }
156+ style = { [ styles . flexGrow1 , styles . mh5 ] }
157+ shouldTrimValues
158+ validate = { validate }
159+ submitButtonText = { translate ( 'common.next' ) }
160+ isSubmitButtonVisible = { false }
161+ ref = { formRef }
162+ >
163+ < View style = { [ styles . flexGrow1 , styles . mt3 ] } >
164+ < View >
165+ < Text >
166+ { translate ( 'mergeAccountsPage.accountDetails.accountToMergeInto' ) }
167+ < Text style = { styles . textStrong } > { userEmailOrPhone } </ Text >
168+ </ Text >
169+ </ View >
170+ < InputWrapper
171+ ref = { inputCallbackRef }
172+ InputComponent = { TextInput }
173+ inputID = { INPUT_IDS . PHONE_OR_EMAIL }
174+ autoCapitalize = "none"
175+ label = { translate ( 'loginForm.phoneOrEmail' ) }
176+ aria-label = { translate ( 'loginForm.phoneOrEmail' ) }
177+ role = { CONST . ROLE . PRESENTATION }
178+ containerStyles = { [ styles . mt8 ] }
179+ autoCorrect = { false }
180+ onChangeText = { setEmail }
181+ value = { email }
182+ />
183+ < InputWrapper
184+ style = { [ styles . mt8 ] }
185+ InputComponent = { CheckboxWithLabel }
186+ inputID = { INPUT_IDS . CONSENT }
187+ label = { translate ( 'mergeAccountsPage.accountDetails.notReversibleConsent' ) }
188+ aria-label = { translate ( 'mergeAccountsPage.accountDetails.notReversibleConsent' ) }
189+ />
166190 </ View >
167- < InputWrapper
168- ref = { inputCallbackRef }
169- InputComponent = { TextInput }
170- inputID = { INPUT_IDS . PHONE_OR_EMAIL }
171- autoCapitalize = "none"
172- label = { translate ( 'loginForm.phoneOrEmail' ) }
173- aria-label = { translate ( 'loginForm.phoneOrEmail' ) }
174- role = { CONST . ROLE . PRESENTATION }
175- containerStyles = { [ styles . mt8 ] }
176- autoCorrect = { false }
177- onChangeText = { setEmail }
178- value = { email }
179- />
180- < InputWrapper
181- style = { [ styles . mt8 ] }
182- InputComponent = { CheckboxWithLabel }
183- inputID = { INPUT_IDS . CONSENT }
184- label = { translate ( 'mergeAccountsPage.accountDetails.notReversibleConsent' ) }
185- aria-label = { translate ( 'mergeAccountsPage.accountDetails.notReversibleConsent' ) }
191+ < FormAlertWithSubmitButton
192+ isAlertVisible = { ! ! genericError }
193+ onSubmit = { ( ) => {
194+ formRef . current ?. submit ( ) ;
195+ } }
196+ message = { genericError }
197+ buttonText = { translate ( 'common.next' ) }
198+ enabledWhenOffline = { false }
199+ containerStyles = { styles . mt3 }
200+ isLoading = { getValidateCodeForAccountMerge ?. isLoading }
186201 />
187- </ View >
188- < FormAlertWithSubmitButton
189- isAlertVisible = { ! ! genericError }
190- onSubmit = { ( ) => {
191- formRef . current ?. submit ( ) ;
192- } }
193- message = { genericError }
194- buttonText = { translate ( 'common.next' ) }
195- enabledWhenOffline = { false }
196- containerStyles = { styles . mt3 }
197- isLoading = { getValidateCodeForAccountMerge ?. isLoading }
198- />
199- </ FormProvider >
202+ </ FormProvider >
203+ </ FullPageOfflineBlockingView >
200204 </ ScreenWrapper >
201205 ) ;
202206}
0 commit comments