-
Notifications
You must be signed in to change notification settings - Fork 0
/
LoggedInPage.js
42 lines (34 loc) · 932 Bytes
/
LoggedInPage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React from 'react';
import { StyleSheet, View, Text, Image, Button } from 'react-native';
import * as Google from 'expo-google-app-auth';
import config from './config';
function LoggedInPage(props) {
return (
<View style={styles.container}>
<Text style={styles.header}>Welcome: {props.name}</Text>
{/* <Image style={styles.image} source="" /> */}
<Button title="Log Out" onPress={() => logOut(props)} />
</View>
);
}
const logOut = async (props) => {
try {
const result = await Google.logOutAsync({
accessToken: props.accessToken,
androidClientId: config.OAUTH2_GOOGLE_ANDROID_KEY
});
props.onLogOut();
}
catch (e){
console.log("error", e);
}
}
const styles = StyleSheet.create({
container: {
},
header: {
},
image: {
},
})
export default LoggedInPage;