diff --git a/apps/native-component-list/package.json b/apps/native-component-list/package.json index 2b7022e26f15dd..7e784b14f54ccf 100644 --- a/apps/native-component-list/package.json +++ b/apps/native-component-list/package.json @@ -27,7 +27,7 @@ "react-native-paper": "^2.0.0-alpha.4", "react-native-platform-touchable": "^1.1.1", "react-native-svg": "6.2.2", - "react-navigation": "^2.17.0", + "react-navigation": "3.0.0-alpha.4", "react-navigation-header-buttons": "^1.2.1", "react-navigation-material-bottom-tabs": "^0.3.0", "regl": "^1.3.0", diff --git a/home/navigation/Navigation.js b/home/navigation/Navigation.js index a78a4396ee3a2c..5b1522dad29835 100644 --- a/home/navigation/Navigation.js +++ b/home/navigation/Navigation.js @@ -23,7 +23,6 @@ import ProjectsForUserScreen from '../screens/ProjectsForUserScreen'; import SnacksForUserScreen from '../screens/SnacksForUserScreen'; import Colors from '../constants/Colors'; -import SearchBar from '../components/SearchBar'; import defaultNavigationOptions from './defaultNavigationOptions'; const ProjectsStack = createStackNavigator( diff --git a/home/package.json b/home/package.json index c73ddb31775a7f..41c9b2d70cf4d6 100644 --- a/home/package.json +++ b/home/package.json @@ -40,7 +40,7 @@ "react-native": "^0.57.1", "react-native-deprecated-custom-components": "^0.1.0", "react-native-infinite-scroll-view": "^0.4.5", - "react-navigation": "^2.17.0", + "react-navigation": "3.0.0-alpha.4", "react-navigation-material-bottom-tabs": "^0.3.0", "react-redux": "^5.0.1", "react-timer-mixin": "^0.13.3", diff --git a/home/utils/isIPhoneX.js b/home/utils/isIPhoneX.js index 345330d5cfd70b..91f28b078bfcfe 100644 --- a/home/utils/isIPhoneX.js +++ b/home/utils/isIPhoneX.js @@ -1,4 +1,13 @@ import { Platform, Dimensions } from 'react-native'; -const { width, height } = Dimensions.get('window'); -const isIPhoneX = Platform.OS === 'ios' && width === 375 && height === 812; -export default isIPhoneX; +const IPHONE_XS_HEIGHT = 812; // iPhone X and XS +const IPHONE_XR_HEIGHT = 896; // iPhone XR and XS Max +const { width: WINDOW_WIDTH, height: WINDOW_HEIGHT } = Dimensions.get('window'); +const IS_IPHONE_X = + Platform.OS === 'ios' && + !Platform.isPad && + !Platform.isTVOS && + (WINDOW_HEIGHT === IPHONE_XS_HEIGHT || + WINDOW_WIDTH === IPHONE_XS_HEIGHT || + WINDOW_HEIGHT === IPHONE_XR_HEIGHT || + WINDOW_WIDTH === IPHONE_XR_HEIGHT); +export default IS_IPHONE_X; diff --git a/modules/NCL/package.json b/modules/NCL/package.json index b683e4732e8938..46d7714ffff5fc 100644 --- a/modules/NCL/package.json +++ b/modules/NCL/package.json @@ -24,7 +24,7 @@ "react": "16.5.0", "react-native": "^0.57.1", "react-native-platform-touchable": "^1.1.1", - "react-navigation": "^2.0.1", + "react-navigation": "3.0.0-alpha.4", "url": "^0.11.0" }, "devDependencies": {