Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Apr 19, 2024
1 parent 1430815 commit e0e1eba
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/pages/workspace/WorkspaceInitialPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit e0e1eba

Please sign in to comment.