-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathApp.js
30 lines (25 loc) · 811 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
28
29
30
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
// REALM
import { RealmProvider } from "./app/models/Project";
// SCREENS
import { HomeScreen } from "./app/HomeScreen";
import { ProjectScreen } from "./app/ProjectScreen";
const Stack = createNativeStackNavigator();
function AppWrapper() {
if (!RealmProvider) {
return null;
}
return (
<RealmProvider>
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Projects" component={ProjectScreen} />
</Stack.Navigator>
</NavigationContainer>
</RealmProvider>
);
}
export default AppWrapper;