-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
27 lines (25 loc) · 951 Bytes
/
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
import "react-native-gesture-handler";
import { NavigationContainer } from "@react-navigation/native";
import React from "react";
import { Platform } from "react-native";
import { Provider as PaperProvider } from "react-native-paper";
import theme from "./app/config/theme";
import AuthStack from "./app/navigation/AuthStack";
import MainStack from "./app/navigation/MainStack";
import { useAuthStatus } from "./app/config/Hooks";
export default function App() {
const isLoggedIn = useAuthStatus();
return (
<PaperProvider theme={theme}>
<NavigationContainer theme={theme}>
{isLoggedIn ? <MainStack /> : <AuthStack />}
</NavigationContainer>
</PaperProvider>
);
}
// disable outline effect when running in the browser
if (Platform.OS === "web") {
const style = document.createElement("style");
style.textContent = `textarea, select, input, button { outline: none!important; }`;
document.head.append(style);
}