-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
34 lines (27 loc) · 725 Bytes
/
App.js
File metadata and controls
34 lines (27 loc) · 725 Bytes
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
import React, { useState } from "react";
// import { NavigationContainer } from "@react-navigation/native";
// import { createNativeStackNavigator } from "@react-navigation/native-stack";
import Main from './screens/Main';
import Login from "./screens/Login";
//import Test from "./screens/Test";
import {auth} from './firebase';
// const Stack = createNativeStackNavigator();
export default function App() {
const [isLoggedIn, setIsLoggedIn] = useState(false);
const LogIn = (loggedin) => {
if(!loggedin){
auth
.signOut()
}
setIsLoggedIn(loggedin);
}
if(isLoggedIn){
return (
<Main LogIn = {LogIn}/>
);
} else {
return (
<Login LogIn = {LogIn}/>
);
}
}