-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
43 lines (37 loc) · 1.11 KB
/
App.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
43
import "react-native-gesture-handler";
import React, { useState, useEffect } from "react";
import { StatusBar } from "react-native";
import LoginScreen from "./components/LoginScreen";
import SignInLogIn from "./components/SignInLogIn";
import { createStackNavigator } from "@react-navigation/stack";
import DrawerBar from "./components/DrawerBar";
import { useFonts } from "expo-font";
const Stack = createStackNavigator();
const App = () => {
//const [name, setName] = useState('');
//const [isOver, setIsOver] = useState(false);
const [isAuthorized, setIsAuthorized] = useState(false);
useFonts({
Avenir: require("./assets/fonts/Avenir.ttf"),
Helvetica: require("./assets/fonts/HelveticaRegular.ttf"),
});
/* useEffect(() => {
const timeoutHandle = setTimeout(() => {
setIsOver(true);
}, 2000);
return cleanupTimer = (timeoutHandle) => {
clearTimeout(timeoutHandle);
}
}) */
return (
<>
<StatusBar />
{isAuthorized ? (
<DrawerBar />
) : (
<SignInLogIn setIsAuthorized={setIsAuthorized} />
)}
</>
);
};
export default App;