diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx
index 9d6f167fc04e..8f69663fb936 100644
--- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx
+++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx
@@ -21,7 +21,7 @@ import Navigation from '@libs/Navigation/Navigation';
import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
import {addSMSDomainIfPhoneNumber} from '@libs/PhoneNumber';
import * as UserUtils from '@libs/UserUtils';
-import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
+import NotFoundPage from '@pages/ErrorPage/NotFoundPage';
import * as User from '@userActions/User';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
@@ -109,72 +109,74 @@ function NewContactMethodPage({route}: NewContactMethodPageProps) {
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(navigateBackTo));
}, [navigateBackTo]);
+ if (isActingAsDelegate) {
+ return ;
+ }
+
return (
-
- loginInputRef.current?.focus()}
- includeSafeAreaPaddingBottom={false}
- shouldEnableMaxHeight
- testID={NewContactMethodPage.displayName}
+ loginInputRef.current?.focus()}
+ includeSafeAreaPaddingBottom={false}
+ shouldEnableMaxHeight
+ testID={NewContactMethodPage.displayName}
+ >
+
+
-
-
- {translate('common.pleaseEnterEmailOrPhoneNumber')}
-
-
-
- {hasFailedToSendVerificationCode && (
-
- )}
-
- {
- if (!loginData) {
- return;
- }
- User.clearContactMethodErrors(addSMSDomainIfPhoneNumber(pendingContactAction?.contactMethod ?? contactMethod), 'addedLogin');
- }}
- onClose={() => {
- if (loginData?.errorFields && pendingContactAction?.contactMethod) {
- User.clearContactMethod(pendingContactAction?.contactMethod);
- User.clearUnvalidatedNewContactMethodAction();
- }
- setIsValidateCodeActionModalVisible(false);
- }}
- isVisible={isValidateCodeActionModalVisible}
- hasMagicCodeBeenSent={!!loginData?.validateCodeSent}
- title={translate('delegate.makeSureItIsYou')}
- sendValidateCode={() => User.requestValidateCodeAction()}
- descriptionPrimary={translate('contacts.enterMagicCode', {contactMethod})}
- />
-
-
+ {translate('common.pleaseEnterEmailOrPhoneNumber')}
+
+
+
+ {hasFailedToSendVerificationCode && (
+
+ )}
+
+ {
+ if (!loginData) {
+ return;
+ }
+ User.clearContactMethodErrors(addSMSDomainIfPhoneNumber(pendingContactAction?.contactMethod ?? contactMethod), 'addedLogin');
+ }}
+ onClose={() => {
+ if (loginData?.errorFields && pendingContactAction?.contactMethod) {
+ User.clearContactMethod(pendingContactAction?.contactMethod);
+ User.clearUnvalidatedNewContactMethodAction();
+ }
+ setIsValidateCodeActionModalVisible(false);
+ }}
+ isVisible={isValidateCodeActionModalVisible}
+ hasMagicCodeBeenSent={!!loginData?.validateCodeSent}
+ title={translate('delegate.makeSureItIsYou')}
+ sendValidateCode={() => User.requestValidateCodeAction()}
+ descriptionPrimary={translate('contacts.enterMagicCode', {contactMethod})}
+ />
+
);
}