Skip to content

Commit

Permalink
Merge pull request #4 from osamhack2020/#3-디바이스-정보-가져오기
Browse files Browse the repository at this point in the history
#3-디바이스 정보 가져오기
  • Loading branch information
Young-in authored Oct 11, 2020
2 parents 33a8d62 + 683edfc commit e4c8a2b
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
14 changes: 10 additions & 4 deletions android/app/src/main/assets/index.android.bundle

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import {
createStackNavigator
} from '@react-navigation/stack';

import {
getUniqueId,
} from 'react-native-device-info';

const Stack = createStackNavigator();

const theme = {
Expand All @@ -44,6 +48,8 @@ const theme = {
};

const App = () => {
const uniqueId = getUniqueId();

return (
<PaperProvider theme={theme}>
<NavigationContainer>
Expand All @@ -57,6 +63,9 @@ const App = () => {
component={ShowQRPage}
options={{
headerShown: false
}}
initialParams={{
uniqueId: uniqueId
}} />
<Stack.Screen name="SchedulePage"
component={InputSchedulePage} />
Expand Down
4 changes: 3 additions & 1 deletion app/components/ShowQRPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import {
} from 'react-native-paper';

export default function ShowQRPage({ navigation, route }) {
const { uniqueId } = route.params;
return (
<View style={styles.container}>
<Text style={styles.paragraph}>Welcome to ShowQRPage!!</Text>
<Text style={styles.paragraph}>{uniqueId}</Text>
<Button style={styles.button} mode="contained"
labelStyle={styles.buttontext}
onPress={() => navigation.goBack()}>Back to Main</Button>
Expand All @@ -25,7 +27,7 @@ const styles = StyleSheet.create({
flex: 1,
justifyContent: 'center',
backgroundColor: '#ecf0f1',
padding: 8,
padding: 24,
},
paragraph: {
margin: 24,
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@react-navigation/stack": "^5.9.3",
"react": "16.13.1",
"react-native": "0.63.3",
"react-native-device-info": "^6.2.0",
"react-native-gesture-handler": "^1.8.0",
"react-native-paper": "^4.2.0",
"react-native-safe-area-context": "^3.1.8",
Expand Down

0 comments on commit e4c8a2b

Please sign in to comment.