-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
33 lines (29 loc) · 1.03 KB
/
App.tsx
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 { ThemeProvider } from "@rneui/themed";
import { decode } from "base-64";
import { StatusBar } from "expo-status-bar";
import { SafeAreaView } from "react-native-safe-area-context";
import { Toast } from "react-native-toast-message/lib/src/Toast";
import { useCachedResources } from "./src/hooks";
import RootStackNavigator from "./src/navigator";
import { SessionProvider } from "./src/providers";
import { lightTheme } from "./src/themes";
if (typeof atob === 'undefined') {
global.atob = decode;
}
export default function App() {
const { isLoadingComplete, session, onboarding } = useCachedResources();
if (!isLoadingComplete) {
return null;
}
return (
<ThemeProvider theme={lightTheme}>
<SafeAreaView style={{ flex: 1, backgroundColor: "transparent" }}>
<StatusBar backgroundColor="white" />
<SessionProvider initialSession={session}>
<RootStackNavigator skipOnboarding={Boolean(onboarding)} />
</SessionProvider>
<Toast />
</SafeAreaView>
</ThemeProvider>
);
}