-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
24 lines (21 loc) · 838 Bytes
/
Copy pathApp.js
File metadata and controls
24 lines (21 loc) · 838 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
import React from "react";
import AuthNavigator from "./navigation/AuthNavigator";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import useAuthStore from "./state/useAuthStore";
import AppNavigator from "./navigation/AppNavigator";
import { StatusBar } from "react-native";
import { NetworkProvider } from "./context/NetworkProvider";
import NoInternetBanner from "./components/NoInternetBanner";
const App = () => {
const isLoggedIn = useAuthStore((state) => state.isLoggedIn);
return (
<NetworkProvider>
<GestureHandlerRootView style={{ flex: 1 }}>
<StatusBar barStyle="dark-content" backgroundColor="#ffffff" />
<NoInternetBanner />
{!isLoggedIn ? <AuthNavigator /> : <AppNavigator />}
</GestureHandlerRootView>
</NetworkProvider>
);
};
export default App;