-
Notifications
You must be signed in to change notification settings - Fork 0
/
UserNavigation.js
40 lines (38 loc) · 1.15 KB
/
UserNavigation.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
import React, { useState, useEffect } from 'react';
import { View, Button, Text, TextInput } from 'react-native'
import useFToken from './GlobalState/useFToken'
import { secFetch } from './secFetch'
import auth from '@react-native-firebase/auth'
UserNavigation = ({
}) => {
/*const [fToken, setFtoken] = useFToken()
const [apiLogin, setApiLogin] = useState(false)
useEffect(() => {
if (fToken) {
let response = secFetch(fToken.token, "/user", 'GET', null)
}
}, [])
*/
function logOut() {
auth().signOut().then(() => Alert.alert("You are succesfully logged out"))
}
if (true) {
return (
<View style={{ flex: 1, backgroundColor: "red" }}>
<Text>LOADING</Text>
<Button
styl={{ flex: 1 }}
onPress={logOut}
title="LOGOUt"
color="#841584"
></Button>
<UserNavigation />
</View>
)
} else {
return (
<View style={{ flex: 1, backgroundColor: "green" }}></View>
)
}
}
export default UserNavigation