diff --git a/App.tsx b/App.tsx index 0329d0c..c98217f 100644 --- a/App.tsx +++ b/App.tsx @@ -1,7 +1,9 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View } from 'react-native'; +import { StatusBar } from "expo-status-bar"; +import { StyleSheet, Text, View } from "react-native"; +import { hasNotch } from "react-native-device-info"; export default function App() { + console.log("hasNotch", hasNotch()); return ( Open up App.tsx to start working on your app! @@ -13,8 +15,8 @@ export default function App() { const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: '#fff', - alignItems: 'center', - justifyContent: 'center', + backgroundColor: "#fff", + alignItems: "center", + justifyContent: "center", }, }); diff --git a/package.json b/package.json index 9189c16..ccf0893 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "react-native": "0.68.2", + "react-native-device-info": "^8.7.1", "react-native-web": "0.17.7" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index b2f60cc..8a78a08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5356,6 +5356,11 @@ react-native-codegen@^0.0.17: jscodeshift "^0.13.1" nullthrows "^1.1.1" +react-native-device-info@^8.7.1: + version "8.7.1" + resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-8.7.1.tgz#fbb06f87dbbc4423abe713874699fb2e6e99fd15" + integrity sha512-cVMZztFa2Qn6qpQa601W61CtUwZQ1KXfqCOeltejAWEXmgIWivC692WGSdtGudj4upSi1UgMSaGcvKjfcpdGjg== + react-native-gradle-plugin@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.0.6.tgz#b61a9234ad2f61430937911003cddd7e15c72b45"