Skip to content

Commit

Permalink
only switch to search bottom tab if there is no route passed
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Jun 5, 2024
1 parent 3c04b02 commit e0fc838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Navigation/switchPolicyID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function switchPolicyID(navigation: NavigationContainerRef<RootSt

// Currently, the search page displayed in the bottom tab has the same URL as the page in the central pane, so we need to redirect to the correct search route.
// Here's the configuration: src/libs/Navigation/AppNavigator/createCustomStackNavigator/index.tsx
const isOpeningSearchFromBottomTab = topmostCentralPaneRoute?.name === SCREENS.SEARCH.CENTRAL_PANE;
const isOpeningSearchFromBottomTab = !route && topmostCentralPaneRoute?.name === SCREENS.SEARCH.CENTRAL_PANE;
if (isOpeningSearchFromBottomTab) {
newPath = ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.ALL);
}
Expand Down

0 comments on commit e0fc838

Please sign in to comment.