-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
40 lines (36 loc) · 1.07 KB
/
App.js
File metadata and controls
40 lines (36 loc) · 1.07 KB
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 {NavigationContainer} from "@react-navigation/native";
import React from "react";
import {AuthProvider, useAuth} from "./navigation/context/AuthContext";
import {StatusBar, View, Text} from "react-native";
import {GestureHandlerRootView} from "react-native-gesture-handler";
import TabNavigationContainer from "./navigation/TabNavigationContainer";
import AuthStackScreen from "./navigation/AuthStackScreen";
import OwnerCapture from "./navigation/screens/HomeParkingValidationScreens/OwnerCapture";
function Account() {
const {user} = useAuth();
if (user) {
return <TabNavigationContainer />;
} else {
return <AuthStackScreen />;
}
}
function App() {
return (
<GestureHandlerRootView style={{flex: 1}}>
<StatusBar
translucent={false}
backgroundColor="white"
barStyle="dark-content"
/>
<AuthProvider>
<NavigationContainer>
<Account />
</NavigationContainer>
</AuthProvider>
</GestureHandlerRootView>
);
}
// function App() {
// return <OwnerCapture />;
// }
export default App;