Skip to content

Commit

Permalink
add react-native-device-info
Browse files Browse the repository at this point in the history
  • Loading branch information
Julienblc committed May 12, 2022
1 parent a5b4239 commit 621ef08
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 7 additions & 5 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<View style={styles.container}>
<Text>Open up App.tsx to start working on your app!</Text>
Expand All @@ -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",
},
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 621ef08

Please sign in to comment.