-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
38 lines (35 loc) · 1.42 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
34
35
36
37
38
import * as React from "react";
import { SafeAreaView } from "react-native";
import { HomeScreen } from "./src/screens/Home";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import { CategoriesScreen } from "./src/screens/Categories";
import { RootStackParamList } from "./src/foundation/types";
import { GoalsScreen } from "./src/screens/Goals";
import { ExpensesScreen } from "./src/screens/Expenses";
import { CategoryProvider } from "./src/context/CategoryContext";
import { ExpenseProvider } from "./src/context/ExpenseContext";
const Stack = createNativeStackNavigator<RootStackParamList>();
const AppNavigator = () => {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Category" component={CategoriesScreen} />
<Stack.Screen name="Goals" component={GoalsScreen} />
<Stack.Screen name="Expenses" component={ExpensesScreen} />
</Stack.Navigator>
</NavigationContainer>
);
};
export default function App() {
return (
<SafeAreaView style={{ flex: 1 }}>
<CategoryProvider>
<ExpenseProvider>
<AppNavigator />
</ExpenseProvider>
</CategoryProvider>
</SafeAreaView>
);
}