Skip to content

Commit

Permalink
Merge pull request #45778 from software-mansion-labs/nav/fix-lhp-rhp-…
Browse files Browse the repository at this point in the history
…from-link

Settings - Left hand menu and RHP do not open instantly when opening from link
  • Loading branch information
marcaaron authored Jul 22, 2024
2 parents 757a6ac + 9969f59 commit 485332d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ const addPolicyIDToRoute = (route: NavigationPartialRoute, policyID?: string) =>
};

function createBottomTabNavigator(route: NavigationPartialRoute<BottomTabName>, policyID?: string): NavigationPartialRoute<typeof NAVIGATORS.BOTTOM_TAB_NAVIGATOR> {
const routesForBottomTabNavigator: Array<NavigationPartialRoute<BottomTabName>> = [{name: SCREENS.HOME, params: {policyID}}];

if (route.name !== SCREENS.HOME) {
// If the generated state requires tab other than HOME, we need to insert it.
routesForBottomTabNavigator.push(addPolicyIDToRoute(route, policyID) as NavigationPartialRoute<BottomTabName>);
}
const routesForBottomTabNavigator: Array<NavigationPartialRoute<BottomTabName>> = [];
routesForBottomTabNavigator.push(addPolicyIDToRoute(route, policyID) as NavigationPartialRoute<BottomTabName>);

return {
name: NAVIGATORS.BOTTOM_TAB_NAVIGATOR,
Expand Down

0 comments on commit 485332d

Please sign in to comment.