Skip to content

Commit

Permalink
[#159396328] Navigate to main tab screen on tab press (pagopa#388)
Browse files Browse the repository at this point in the history
* Add pop to top navigation on tab bar press.

* Update and patch @types/react-navigation.

* Remove custom handler.

* Remove no longer necessary patch.
  • Loading branch information
DenisFrezzato authored and cloudify committed Aug 20, 2018
1 parent 9a036e6 commit 863b3e7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@types/react-native-mixpanel": "^0.1.0",
"@types/react-native-push-notification": "^3.0.2",
"@types/react-native-vector-icons": "^4.6.1",
"@types/react-navigation": "^2.0.15",
"@types/react-navigation": "^2.0.16",
"@types/react-redux": "^5.0.20",
"@types/react-test-renderer": "^16.0.2",
"@types/redux-form": "^7.4.5",
Expand Down
1 change: 1 addition & 0 deletions ts/store/reducers/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function nextState(state: NavigationState, action: Action): NavigationState {
case NavigationActions.RESET:
case NavigationActions.SET_PARAMS:
case StackActions.RESET:
case StackActions.POP_TO_TOP:
return AppNavigator.router.getStateForAction(action, state);

// Used to restore a saved navigation state
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,9 @@
dependencies:
"@types/react" "*"

"@types/react-navigation@^2.0.15":
version "2.0.15"
resolved "https://registry.yarnpkg.com/@types/react-navigation/-/react-navigation-2.0.15.tgz#ca4bc840a3182855ebf951001c0d85543af34b3f"
"@types/react-navigation@^2.0.16":
version "2.0.16"
resolved "https://registry.yarnpkg.com/@types/react-navigation/-/react-navigation-2.0.16.tgz#cf9b45e3633f5fe4ad645b9aabded6bfd03fc6d1"
dependencies:
"@types/react" "*"
"@types/react-native" "*"
Expand Down

0 comments on commit 863b3e7

Please sign in to comment.