-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
38 lines (34 loc) · 1.05 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
// import { StatusBar } from "expo-status-bar";
import { useState, useEffect, useRef } from "react";
import "react-native-gesture-handler";
import { StyleSheet, SafeAreaView, Platform, StatusBar } from "react-native";
import * as Notifications from "expo-notifications";
import AppNavigator from "./navigation";
import { AuthContextProvider } from "./contexts/authContext";
import { LoadingContextProvider } from "./contexts/LoadingContext";
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: false,
shouldSetBadge: false,
}),
});
export default function App() {
return (
<AuthContextProvider>
<SafeAreaView style={styles.container}>
<LoadingContextProvider>
<AppNavigator />
</LoadingContextProvider>
</SafeAreaView>
</AuthContextProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
fontFamily: "Roboto",
},
});