diff --git a/src/libs/Navigation/linkTo/index.ts b/src/libs/Navigation/linkTo/index.ts index 7d6d62b9a5aa..6cec46eae144 100644 --- a/src/libs/Navigation/linkTo/index.ts +++ b/src/libs/Navigation/linkTo/index.ts @@ -181,7 +181,10 @@ export default function linkTo(navigation: NavigationContainerRef, targetFocusedRoute?.params as Record) + ) { return; } diff --git a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx index 185b9cd0cfa2..092c77bb6bf6 100644 --- a/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx +++ b/src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx @@ -84,18 +84,6 @@ function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceM [member?.role, translate], ); - useEffect(() => { - if (!policy?.errorFields?.changeOwner && policy?.isChangeOwnerSuccessful) { - return; - } - - const changeOwnerErrors = Object.keys(policy?.errorFields?.changeOwner ?? {}); - - if (changeOwnerErrors && changeOwnerErrors.length > 0) { - Navigation.navigate(ROUTES.WORKSPACE_OWNER_CHANGE_CHECK.getRoute(policyID, accountID, changeOwnerErrors[0] as ValueOf)); - } - }, [accountID, policy?.errorFields?.changeOwner, policy?.isChangeOwnerSuccessful, policyID]); - useEffect(() => { if (!prevMember || prevMember?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || member?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) { return; diff --git a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx index 11389746e6c4..a6f1568b63e0 100644 --- a/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx +++ b/src/pages/workspace/members/WorkspaceOwnerChangeWrapperPage.tsx @@ -48,7 +48,7 @@ function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWr const changeOwnerErrors = Object.keys(policy?.errorFields?.changeOwner ?? {}); - if (changeOwnerErrors && changeOwnerErrors.length > 0 && changeOwnerErrors[0] !== CONST.POLICY.OWNERSHIP_ERRORS.NO_BILLING_CARD) { + if (changeOwnerErrors && changeOwnerErrors.length > 0) { Navigation.navigate(ROUTES.WORKSPACE_OWNER_CHANGE_CHECK.getRoute(policyID, accountID, changeOwnerErrors[0] as ValueOf)); } }, [accountID, policy, policy?.errorFields?.changeOwner, policyID]);