@@ -5,14 +5,11 @@ import type {AnimatedTextInputRef} from '@components/RNTextInput';
55import ScreenWrapper from '@components/ScreenWrapper' ;
66import TabSelector from '@components/TabSelector/TabSelector' ;
77import useLocalize from '@hooks/useLocalize' ;
8- import useOnyx from '@hooks/useOnyx' ;
9- import useResponsiveLayout from '@hooks/useResponsiveLayout' ;
108import useThemeStyles from '@hooks/useThemeStyles' ;
119import { setNewRoomFormLoading } from '@libs/actions/Report' ;
1210import Navigation from '@libs/Navigation/Navigation' ;
1311import OnyxTabNavigator , { TabScreenWithFocusTrapWrapper , TopTab } from '@libs/Navigation/OnyxTabNavigator' ;
1412import CONST from '@src/CONST' ;
15- import ONYXKEYS from '@src/ONYXKEYS' ;
1613import NewChatPage from './NewChatPage' ;
1714import WorkspaceNewRoomPage from './workspace/WorkspaceNewRoomPage' ;
1815
@@ -23,8 +20,6 @@ function NewChatSelectorPage() {
2320 const [ headerWithBackBtnContainerElement , setHeaderWithBackButtonContainerElement ] = useState < HTMLElement | null > ( null ) ;
2421 const [ tabBarContainerElement , setTabBarContainerElement ] = useState < HTMLElement | null > ( null ) ;
2522 const [ activeTabContainerElement , setActiveTabContainerElement ] = useState < HTMLElement | null > ( null ) ;
26- const [ formState ] = useOnyx ( ONYXKEYS . FORMS . NEW_ROOM_FORM , { canBeMissing : true } ) ;
27- const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
2823 const chatPageInputRef = useRef < AnimatedTextInputRef | null > ( null ) ;
2924 const roomPageInputRef = useRef < AnimatedTextInputRef | null > ( null ) ;
3025
@@ -84,7 +79,6 @@ function NewChatSelectorPage() {
8479 tabBar = { TabSelector }
8580 onTabBarFocusTrapContainerElementChanged = { setTabBarContainerElement }
8681 onActiveTabFocusTrapContainerElementChanged = { onTabFocusTrapContainerElementChanged }
87- disableSwipe = { ! ! formState ?. isLoading && shouldUseNarrowLayout }
8882 onTabSelect = { onTabSelectFocusHandler }
8983 >
9084 < TopTab . Screen name = { CONST . TAB . NEW_CHAT } >
0 commit comments