diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 873f6d0c0f16..d8687eaeec71 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -12,7 +12,9 @@ function getUrlWithBackToParam(url: TUrl, backTo?: string): } const ROUTES = { - HOME: '', + HOME_ROOT: '', + // This is a utility route to allow navigating to the home screen explicitly + HOME: 'home', ALL_SETTINGS: 'all-settings', diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 7d0b66d441fc..585afac64538 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -6,6 +6,7 @@ import DeepValueOf from './types/utils/DeepValueOf'; const PROTECTED_SCREENS = { HOME: 'Home', + HOME_ROOT: 'HomeRoot', CONCIERGE: 'Concierge', REPORT_ATTACHMENTS: 'ReportAttachments', } as const; diff --git a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx index 96825b6d827f..1ca231d5b296 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx +++ b/src/libs/Navigation/AppNavigator/Navigators/BottomTabNavigator.tsx @@ -20,6 +20,10 @@ function BottomTabNavigator() { + = { initialRouteName: SCREENS.HOME, screens: { [SCREENS.HOME]: ROUTES.HOME, + [SCREENS.HOME_ROOT]: ROUTES.HOME_ROOT, [SCREENS.ALL_SETTINGS]: ROUTES.ALL_SETTINGS, [SCREENS.WORKSPACE.INITIAL]: { path: ROUTES.WORKSPACE_INITIAL.route, diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index 921c719387d6..1fc543fb3f2f 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -396,6 +396,7 @@ type FullScreenNavigatorParamList = { type BottomTabNavigatorParamList = { [SCREENS.HOME]: undefined; + [SCREENS.HOME_ROOT]: undefined; [SCREENS.ALL_SETTINGS]: undefined; [SCREENS.WORKSPACE.INITIAL]: undefined; };