-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.js
More file actions
54 lines (50 loc) · 1.36 KB
/
App.js
File metadata and controls
54 lines (50 loc) · 1.36 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { StatusBar } from "expo-status-bar";
import { StyleSheet, View, ActivityIndicator } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { ThemeProvider } from "./src/context/ThemeContext";
import { GroupProvider } from "./src/context/GroupContext";
import { AuthProvider } from "./src/context/AuthContext";
import RootNavigator from "./src/navigation/RootNavigator";
import {
useFonts,
Syne_400Regular,
Syne_500Medium,
Syne_700Bold,
Syne_800ExtraBold,
} from "@expo-google-fonts/syne";
import { theme } from "./src/styles/theme";
export default function App() {
let [fontsLoaded] = useFonts({
Syne_400Regular,
Syne_500Medium,
Syne_700Bold,
Syne_800ExtraBold,
});
if (!fontsLoaded) {
return (
<View style={styles.loadingContainer}>
<ActivityIndicator size="large" color={theme.colors.aperitivoSpritz} />
</View>
);
}
return (
<ThemeProvider>
<AuthProvider>
<GroupProvider>
<NavigationContainer>
<RootNavigator />
<StatusBar style="auto" />
</NavigationContainer>
</GroupProvider>
</AuthProvider>
</ThemeProvider>
);
}
const styles = StyleSheet.create({
loadingContainer: {
flex: 1,
backgroundColor: theme.colors.oldReceipt,
alignItems: "center",
justifyContent: "center",
},
});