-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
45 lines (42 loc) · 1.27 KB
/
App.tsx
File metadata and controls
45 lines (42 loc) · 1.27 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
import { StyleSheet } from "react-native";
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
import useCachedResources from "./hooks/useCachedResources";
import useColorScheme from "./hooks/useColorScheme";
import Navigation from "@navigation/index";
import { RecoilRoot } from "recoil";
import { RelayEnvironmentProvider } from "react-relay/hooks";
import RelayEnvironment from "./RelayEnvironment";
import { View } from "@components/atoms/Themed";
import Colors from "@constants/Colors";
export default function App() {
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
if (!isLoadingComplete) {
return null;
} else {
return (
<RelayEnvironmentProvider environment={RelayEnvironment}>
<RecoilRoot>
<SafeAreaProvider>
<SafeAreaView style={styles.container}>
<View style={styles.content}>
<Navigation colorScheme={colorScheme} />
</View>
</SafeAreaView>
</SafeAreaProvider>
</RecoilRoot>
</RelayEnvironmentProvider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
},
content: {
maxWidth: 500,
width: "100%",
height: "100%",
},
});