From e0e1eba7f59dfdea2d8857f6574c316f28a92f09 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 19 Apr 2024 14:44:03 +0700 Subject: [PATCH] fix conflict --- src/pages/workspace/WorkspaceInitialPage.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/pages/workspace/WorkspaceInitialPage.tsx b/src/pages/workspace/WorkspaceInitialPage.tsx index a18f9feda1f4..2f32034391a5 100644 --- a/src/pages/workspace/WorkspaceInitialPage.tsx +++ b/src/pages/workspace/WorkspaceInitialPage.tsx @@ -269,20 +269,6 @@ function WorkspaceInitialPage({policyDraft, policy: policyProp, reimbursementAcc PolicyUtils.goBackFromInvalidPolicy(); }, [policy, prevPolicy]); - // We are checking if the user can access the route. - // If user can't access the route, we are dismissing any modals that are open when the NotFound view is shown - const canAccessRoute = activeRoute && menuItems.some((item) => item.routeName === activeRoute); - - useEffect(() => { - if (!shouldShowNotFoundPage && canAccessRoute) { - return; - } - // We are dismissing any modals that are open when the NotFound view is shown - Navigation.isNavigationReady().then(() => { - Navigation.dismissRHP(); - }); - }, [canAccessRoute, policy, shouldShowNotFoundPage]); - const policyAvatar = useMemo(() => { if (!policy) { return {source: Expensicons.ExpensifyAppIcon, name: CONST.WORKSPACE_SWITCHER.NAME, type: CONST.ICON_TYPE_AVATAR};