diff --git a/src/components/PurposeForUsingExpensifyModal.tsx b/src/components/PurposeForUsingExpensifyModal.tsx index 175bb4acb698..e65646aeac84 100644 --- a/src/components/PurposeForUsingExpensifyModal.tsx +++ b/src/components/PurposeForUsingExpensifyModal.tsx @@ -23,7 +23,6 @@ import type {MenuItemProps} from './MenuItem'; import MenuItemList from './MenuItemList'; import Modal from './Modal'; import Text from './Text'; -import Navigation from '@libs/Navigation/Navigation'; // This is not translated because it is a message coming from concierge, which only supports english const messageCopy = { @@ -93,7 +92,7 @@ function PurposeForUsingExpensifyModal({isLoadingApp = false}: PurposeForUsingEx const styles = useThemeStyles(); const {isSmallScreenWidth, windowHeight} = useWindowDimensions(); const navigation = useNavigation(); - const [isModalOpen, setIsModalOpen] = useState(true); + const [isModalOpen, setIsModalOpen] = useState(false); const theme = useTheme(); useEffect(() => { @@ -111,13 +110,11 @@ function PurposeForUsingExpensifyModal({isLoadingApp = false}: PurposeForUsingEx const closeModal = useCallback(() => { Report.dismissEngagementModal(); setIsModalOpen(false); - Navigation.goBack(); }, []); const completeModalAndClose = useCallback((message: string, choice: ValueOf) => { Report.completeEngagementModal(message, choice); setIsModalOpen(false); - Navigation.goBack(); Report.navigateToConciergeChat(); }, []); diff --git a/src/components/WorkspaceSwitcherButton.tsx b/src/components/WorkspaceSwitcherButton.tsx index 03e91b1f71ad..b7485fbab7a8 100644 --- a/src/components/WorkspaceSwitcherButton.tsx +++ b/src/components/WorkspaceSwitcherButton.tsx @@ -44,7 +44,7 @@ function WorkspaceSwitcherButton({activeWorkspaceID, policy}: WorkspaceSwitcherB accessible onPress={() => interceptAnonymousUser(() => { - Navigation.navigate(ROUTES.WELCOME); + Navigation.navigate(ROUTES.WORKSPACE_SWITCHER); }) } > diff --git a/src/hooks/useWindowDimensions/index.ts b/src/hooks/useWindowDimensions/index.ts index fdaa96d747c5..b0a29e9f901b 100644 --- a/src/hooks/useWindowDimensions/index.ts +++ b/src/hooks/useWindowDimensions/index.ts @@ -1,6 +1,5 @@ // eslint-disable-next-line no-restricted-imports import {Dimensions, useWindowDimensions} from 'react-native'; -import Log from '@libs/Log'; import variables from '@styles/variables'; import type WindowDimensions from './types'; @@ -16,8 +15,6 @@ export default function (): WindowDimensions { const isMediumScreenWidth = windowWidth > variables.mobileResponsiveWidthBreakpoint && windowWidth <= variables.tabletResponsiveWidthBreakpoint; const isLargeScreenWidth = windowWidth > variables.tabletResponsiveWidthBreakpoint; - Log.info(`WINDOW WIDTH ${windowWidth}`); - return { windowWidth, windowHeight, diff --git a/src/libs/Navigation/NavigationRoot.tsx b/src/libs/Navigation/NavigationRoot.tsx index 76e9cfa9d650..20c426a74c71 100644 --- a/src/libs/Navigation/NavigationRoot.tsx +++ b/src/libs/Navigation/NavigationRoot.tsx @@ -41,8 +41,6 @@ function parseAndLogRoute(state: NavigationState) { return; } - Log.info(`Current state ${JSON.stringify(state)}`); - const currentPath = customGetPathFromState(state, linkingConfig.config); const focusedRoute = findFocusedRoute(state); @@ -76,8 +74,6 @@ function NavigationRoot({authenticated, lastVisitedPath, initialUrl, onReady}: N return undefined; } - return undefined; - const path = initialUrl ? getPathFromURL(initialUrl) : null; // For non-nullable paths we don't want to set initial state @@ -122,8 +118,6 @@ function NavigationRoot({authenticated, lastVisitedPath, initialUrl, onReady}: N if (!state) { return; } - Log.info('STATE'); - Log.info(JSON.stringify(state)); const activeWorkspaceID = getPolicyIDFromState(state as NavigationState); // Performance optimization to avoid context consumers to delay first render setTimeout(() => {