Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 18 additions & 24 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,24 @@ const DYNAMIC_ROUTES = {
getRoute: (country = '') => `country?country=${country}`,
queryParams: ['country'],
},
SETTINGS_CONTACT_METHOD_DETAILS: {
path: 'details',
entryScreens: [SCREENS.SETTINGS.PROFILE.CONTACT_METHODS, SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD],
getRoute: (contactMethod: string, shouldSkipInitialValidation?: boolean) =>
getUrlWithParams('details', {
contactMethod,
shouldSkipInitialValidation: shouldSkipInitialValidation ? 'true' : undefined,
}),
queryParams: ['contactMethod', 'shouldSkipInitialValidation'],
},
SETTINGS_NEW_CONTACT_METHOD: {
path: 'new-contact-method',
entryScreens: [SCREENS.SETTINGS.PROFILE.CONTACT_METHODS, SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE],
},
SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE: {
path: 'confirm-magic-code',
entryScreens: [SCREENS.SETTINGS.PROFILE.CONTACT_METHODS],
},
NOTIFICATION_PREFERENCES: {
path: 'notification-preferences',
entryScreens: [SCREENS.REPORT_SETTINGS.ROOT, SCREENS.PROFILE_ROOT],
Expand Down Expand Up @@ -714,30 +732,6 @@ const ROUTES = {
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
getRoute: (backTo?: string) => getUrlWithBackToParam('settings/profile/contact-methods', backTo),
},
SETTINGS_CONTACT_METHOD_DETAILS: {
route: 'settings/profile/contact-methods/:contactMethod/details',
getRoute: (contactMethod: string, backTo?: string, shouldSkipInitialValidation?: boolean) => {
const encodedMethod = encodeURIComponent(contactMethod);

// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
return getUrlWithBackToParam(`settings/profile/contact-methods/${encodedMethod}/details${shouldSkipInitialValidation ? `?shouldSkipInitialValidation=true` : ``}`, backTo);
},
},
SETTINGS_NEW_CONTACT_METHOD: {
route: 'settings/profile/contact-methods/new',

// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
getRoute: (backTo?: string) => getUrlWithBackToParam('settings/profile/contact-methods/new', backTo),
},
SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE: {
route: 'settings/profile/contact-methods/new/confirm-magic-code',
getRoute: (backTo?: string) => {
// TODO this backTo comes from drilling it through settings screens
// should be removed once https://github.com/Expensify/App/pull/72219 is resolved
// eslint-disable-next-line no-restricted-syntax -- Legacy route generation
return getUrlWithBackToParam(`settings/profile/contact-methods/new/confirm-magic-code`, backTo);
},
},
SETTINGS_CONTACT_METHOD_VERIFY_ACCOUNT: {
route: 'settings/profile/contact-methods/verify',
getRoute: (backTo?: string, forwardTo?: string) =>
Expand Down
6 changes: 3 additions & 3 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ const SCREENS = {
ROOT: 'Settings_Profile',
DISPLAY_NAME: 'Settings_Display_Name',
CONTACT_METHODS: 'Settings_ContactMethods',
CONTACT_METHOD_DETAILS: 'Settings_ContactMethodDetails',
NEW_CONTACT_METHOD: 'Settings_NewContactMethod',
NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE: 'Settings_NewContactMethod_ConfirmMagicCode',
DYNAMIC_CONTACT_METHOD_DETAILS: 'Dynamic_Settings_ContactMethodDetails',
DYNAMIC_NEW_CONTACT_METHOD: 'Dynamic_Settings_NewContactMethod',
DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE: 'Dynamic_Settings_NewContactMethod_ConfirmMagicCode',
CONTACT_METHOD_VERIFY_ACCOUNT: 'Settings_ContactMethod_Verify_Account',
STATUS_CLEAR_AFTER: 'Settings_Status_Clear_After',
STATUS_CLEAR_AFTER_DATE: 'Settings_Status_Clear_After_Date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,9 @@
[SCREENS.SETTINGS.PROFILE.ADDRESS_STATE]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/PersonalDetails/StateSelectionPage').default,
[SCREENS.SETTINGS.PROFILE.AVATAR]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Avatar/AvatarPage').default,
[SCREENS.SETTINGS.PROFILE.CONTACT_METHODS]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/ContactMethodsPage').default,
[SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/ContactMethodDetailsPage').default,
[SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/NewContactMethodPage').default,
[SCREENS.SETTINGS.PROFILE.DYNAMIC_CONTACT_METHOD_DETAILS]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/ContactMethodDetailsPage').default,
[SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/NewContactMethodPage').default,
[SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE]: () =>

Check failure on line 398 in src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Property 'NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE' does not exist on type '{ readonly ROOT: "Settings_Profile"; readonly DISPLAY_NAME: "Settings_Display_Name"; readonly CONTACT_METHODS: "Settings_ContactMethods"; readonly DYNAMIC_CONTACT_METHOD_DETAILS: "Dynamic_Settings_ContactMethodDetails"; ... 17 more ...; readonly ADDRESS_STATE: "Settings_Address_State"; }'. Did you mean 'DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE'?
require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/NewContactMethodConfirmMagicCodePage').default,
Comment on lines +397 to 399
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Register confirm magic code screen with dynamic key

SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE was removed in this commit (replaced by DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE), but this navigator still references the old key. As a result, the confirm page is not registered under the route name produced by linking (Dynamic_Settings_NewContactMethod_ConfirmMagicCode), so navigating to .../contact-methods/confirm-magic-code will fail at runtime.

Useful? React with 👍 / 👎.

[SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_VERIFY_ACCOUNT]: () => require<ReactComponentModule>('../../../../pages/settings/Profile/Contacts/VerifyAccountPage').default,
[SCREENS.SETTINGS.PREFERENCES.PRIORITY_MODE]: () => require<ReactComponentModule>('../../../../pages/settings/Preferences/PriorityModePage').default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
SCREENS.SETTINGS.PROFILE.DISPLAY_NAME,
SCREENS.SETTINGS.PROFILE.CONTACT_METHODS,
SCREENS.SETTINGS.PROFILE.AVATAR,
SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS,
SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD,
SCREENS.SETTINGS.PROFILE.DYNAMIC_CONTACT_METHOD_DETAILS,
SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD,
SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE,

Check failure on line 12 in src/libs/Navigation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts

View workflow job for this annotation

GitHub Actions / typecheck

Property 'NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE' does not exist on type '{ readonly ROOT: "Settings_Profile"; readonly DISPLAY_NAME: "Settings_Display_Name"; readonly CONTACT_METHODS: "Settings_ContactMethods"; readonly DYNAMIC_CONTACT_METHOD_DETAILS: "Dynamic_Settings_ContactMethodDetails"; ... 17 more ...; readonly ADDRESS_STATE: "Settings_Address_State"; }'. Did you mean 'DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE'?
SCREENS.SETTINGS.PROFILE.STATUS_CLEAR_AFTER,
SCREENS.SETTINGS.PROFILE.STATUS_CLEAR_AFTER_DATE,
SCREENS.SETTINGS.PROFILE.STATUS_CLEAR_AFTER_TIME,
Expand Down
14 changes: 3 additions & 11 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,17 +429,9 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = {
path: ROUTES.SETTINGS_AVATAR,
exact: true,
},
[SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS]: {
path: ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.route,
},
[SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD]: {
path: ROUTES.SETTINGS_NEW_CONTACT_METHOD.route,
exact: true,
},
[SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE]: {
path: ROUTES.SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE.route,
exact: true,
},
[SCREENS.SETTINGS.PROFILE.DYNAMIC_CONTACT_METHOD_DETAILS]: DYNAMIC_ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.path,
[SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD]: DYNAMIC_ROUTES.SETTINGS_NEW_CONTACT_METHOD.path,
[SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE]: DYNAMIC_ROUTES.SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE.path,
[SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_VERIFY_ACCOUNT]: {
path: ROUTES.SETTINGS_CONTACT_METHOD_VERIFY_ACCOUNT.route,
exact: true,
Expand Down
10 changes: 3 additions & 7 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,17 @@ type SettingsNavigatorParamList = {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo: Routes;
};
[SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS]: {
[SCREENS.SETTINGS.PROFILE.DYNAMIC_CONTACT_METHOD_DETAILS]: {
contactMethod: string;
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo?: Routes;
shouldSkipInitialValidation?: string;
};
[SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD]: {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo?: Routes;
};
[SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE]: {
newContactMethod: string;
[SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD]: {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo?: Routes;
};
[SCREENS.SETTINGS.PROFILE.DYNAMIC_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE]: undefined;
[SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_VERIFY_ACCOUNT]: {
// eslint-disable-next-line no-restricted-syntax -- `backTo` usages in this file are legacy. Do not add new `backTo` params to screens. See contributingGuides/NAVIGATION.md
backTo?: Routes;
Expand Down
31 changes: 16 additions & 15 deletions src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import ValidateCodeActionForm from '@components/ValidateCodeActionForm';
import type {ValidateCodeFormHandle} from '@components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm';
import useConfirmModal from '@hooks/useConfirmModal';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useDynamicBackPath from '@hooks/useDynamicBackPath';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
Expand All @@ -43,15 +44,15 @@ import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {close} from '@userActions/Modal';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import {DYNAMIC_ROUTES} from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import type {Login} from '@src/types/onyx';
import {isEmptyObject} from '@src/types/utils/EmptyObject';
import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue';
import KeyboardUtils from '@src/utils/keyboard';
import getDecodedContactMethodFromUriParam from './utils';

type ContactMethodDetailsPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.CONTACT_METHOD_DETAILS>;
type ContactMethodDetailsPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.DYNAMIC_CONTACT_METHOD_DETAILS>;

function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
const [loginList, loginListResult] = useOnyx(ONYXKEYS.LOGIN_LIST);
Expand All @@ -73,7 +74,7 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
const icons = useMemoizedLazyExpensifyIcons(['Star', 'Trashcan']);

const validateCodeFormRef = useRef<ValidateCodeFormHandle>(null);
const backTo = route.params.backTo;
const backPath = useDynamicBackPath(DYNAMIC_ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.path);

/**
* Gets the current contact method from the route params
Expand All @@ -94,8 +95,8 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
* Attempt to set this contact method as user's "Default contact method"
*/
const setAsDefault = useCallback(() => {
setContactMethodAsDefault(currentUserPersonalDetails, allPolicies, contactMethod, formatPhoneNumber, backTo);
}, [currentUserPersonalDetails, allPolicies, contactMethod, formatPhoneNumber, backTo]);
setContactMethodAsDefault(currentUserPersonalDetails, allPolicies, contactMethod, formatPhoneNumber, backPath);
}, [currentUserPersonalDetails, allPolicies, contactMethod, formatPhoneNumber, backPath]);

/**
* Determines whether the user's primary login switching is restricted
Expand Down Expand Up @@ -154,23 +155,23 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
if (isFocused) {
// Navigate to methods page on successful magic code verification.
// The validatedDate property indicates successful magic code verification.
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo));
Navigation.goBack(backPath);
} else {
// Set flag to navigate when screen regains focus
setShouldNavigateOnFocus(true);
}
// eslint-disable-next-line react-hooks/exhaustive-deps -- Omitting `isFocused` since we don't want this effect to on focus transitions
}, [prevValidatedDate, loginData?.validatedDate, isDefaultContactMethod, backTo]);
}, [prevValidatedDate, loginData?.validatedDate, isDefaultContactMethod, backPath]);

// Handle navigation when screen regains focus and flag is set
useEffect(() => {
if (!isFocused || !shouldNavigateOnFocus) {
return;
}
setShouldNavigateOnFocus(false);
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo));
Navigation.goBack(backPath);
// eslint-disable-next-line react-hooks/exhaustive-deps -- Only fire on focus transitions
}, [isFocused]);
}, [isFocused, shouldNavigateOnFocus, backPath]);

useEffect(() => {
setIsValidateCodeFormVisible(!loginData?.validatedDate);
Expand Down Expand Up @@ -211,7 +212,7 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
return;
}

deleteContactMethod(contactMethod, loginList ?? {}, backTo);
deleteContactMethod(contactMethod, loginList ?? {}, backPath);
};

if (canUseTouchScreen()) {
Expand All @@ -222,7 +223,7 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
}

openDeleteModal();
}, [contactMethod, loginList, backTo, showRemoveContactMethodModal]);
}, [contactMethod, loginList, backPath, showRemoveContactMethodModal]);

const getThreeDotsMenuItems = useCallback(() => {
const menuItems = [];
Expand Down Expand Up @@ -252,8 +253,8 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
<FullPageNotFoundView
shouldShow
linkTranslationKey="contacts.goBackContactMethods"
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo))}
onLinkPress={() => Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo))}
onBackButtonPress={() => Navigation.goBack(backPath)}
onLinkPress={() => Navigation.goBack(backPath)}
/>
</ScreenWrapper>
);
Expand Down Expand Up @@ -348,7 +349,7 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
<HeaderWithBackButton
title={formattedContactMethod}
threeDotsMenuItems={getThreeDotsMenuItems()}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo))}
onBackButtonPress={() => Navigation.goBack(backPath)}
shouldShowThreeDotsButton={getThreeDotsMenuItems().length > 0}
shouldOverlayDots
onThreeDotsButtonPress={() => {
Expand All @@ -370,7 +371,7 @@ function ContactMethodDetailsPage({route}: ContactMethodDetailsPageProps) {
onDismiss={() => {
clearContactMethod([contactMethod]);
clearUnvalidatedNewContactMethodAction();
Navigation.goBack(ROUTES.SETTINGS_CONTACT_METHODS.getRoute(backTo));
Navigation.goBack(backPath);
}}
/>
)}
Expand Down
21 changes: 7 additions & 14 deletions src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@ import ScrollView from '@components/ScrollView';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useThemeStyles from '@hooks/useThemeStyles';
import createDynamicRoute from '@libs/Navigation/helpers/dynamicRoutesUtils/createDynamicRoute';
import Navigation from '@libs/Navigation/Navigation';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import type {SettingsNavigatorParamList} from '@libs/Navigation/types';
import {getContactMethodsOptions} from '@libs/UserUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import ROUTES, {DYNAMIC_ROUTES} from '@src/ROUTES';

type ContactMethodsPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.CONTACT_METHODS>;

function ContactMethodsPage({route}: ContactMethodsPageProps) {
function ContactMethodsPage() {
const styles = useThemeStyles();
const {translate} = useLocalize();
const [loginList] = useOnyx(ONYXKEYS.LOGIN_LIST);
const [session] = useOnyx(ONYXKEYS.SESSION);
const navigateBackTo = route?.params?.backTo;

const {isActingAsDelegate} = useDelegateNoAccessState();
const {showDelegateNoAccessModal} = useDelegateNoAccessActions();
Expand All @@ -51,13 +46,11 @@ function ContactMethodsPage({route}: ContactMethodsPageProps) {
}

if (!isUserValidated) {
Navigation.navigate(
ROUTES.SETTINGS_CONTACT_METHOD_VERIFY_ACCOUNT.getRoute(Navigation.getActiveRoute(), ROUTES.SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE.getRoute(navigateBackTo)),
);
Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHOD_VERIFY_ACCOUNT.getRoute(Navigation.getActiveRoute(), createDynamicRoute(DYNAMIC_ROUTES.SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE.path)));
return;
}
Navigation.navigate(ROUTES.SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE.getRoute(navigateBackTo));
}, [navigateBackTo, isActingAsDelegate, showDelegateNoAccessModal, isAccountLocked, isUserValidated, showLockedAccountModal]);
Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.SETTINGS_NEW_CONTACT_METHOD_CONFIRM_MAGIC_CODE.path));
}, [isActingAsDelegate, showDelegateNoAccessModal, isAccountLocked, isUserValidated, showLockedAccountModal]);

return (
<ScreenWrapper
Expand All @@ -82,7 +75,7 @@ function ContactMethodsPage({route}: ContactMethodsPageProps) {
<MenuItem
title={option.menuItemTitle}
description={option.description}
onPress={() => Navigation.navigate(ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.getRoute(option.partnerUserID, navigateBackTo))}
onPress={() => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.SETTINGS_CONTACT_METHOD_DETAILS.getRoute(option.partnerUserID)))}
brickRoadIndicator={option.indicator}
shouldShowBasicTitle
shouldShowRightIcon
Expand Down
Loading
Loading