Skip to content

Commit

Permalink
Merge pull request #26856 from hungvu193/fix-reset-root-navigation
Browse files Browse the repository at this point in the history
Fix Deeplinks except chat reports are not working on web
  • Loading branch information
mountiny authored Sep 8, 2023
2 parents 911fe99 + 7c42a12 commit 7c9fc84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/Navigation/NavigationRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ function NavigationRoot(props) {
}, [isSmallScreenWidth]);

useEffect(() => {
if (!navigationRef.isReady()) {
if (!navigationRef.isReady() || !props.authenticated) {
return;
}
// We need to force state rehydration so the CustomRouter can add the CentralPaneNavigator route if necessary.
navigationRef.resetRoot(navigationRef.getRootState());
}, [isSmallScreenWidth]);
}, [isSmallScreenWidth, props.authenticated]);

const prevStatusBarBackgroundColor = useRef(themeColors.appBG);
const statusBarBackgroundColor = useRef(themeColors.appBG);
Expand Down

0 comments on commit 7c9fc84

Please sign in to comment.