-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
51 lines (45 loc) · 1.98 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
39
40
41
42
43
44
45
46
47
48
49
50
51
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text } from 'react-native';
import CategoriesScreen from './screens/CategoriesScreen';
import { NavigationContainer } from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { Ionicons } from '@expo/vector-icons'
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import MealsOverviewScreen from './screens/MealsOverviewScreen';
import MealScreen from './screens/MealScreen';
import FavoritesScreen from './screens/FavoritesScreen';
//import FavoritesContextProvider from './store/context/favorites-context';
import { Store } from './store/redux/store';
import { Provider } from 'react-redux';
const Stack = createNativeStackNavigator();
const Drawer = createDrawerNavigator();
function DrawerNavigator() {
return <Drawer.Navigator>
<Drawer.Screen name="Categories" component={CategoriesScreen}
options={{drawerIcon: ({color, size}) => (<Ionicons name='list' color={color} size={size}/>), }} />
<Drawer.Screen name="Favorites" component={FavoritesScreen}
options={{drawerIcon: ({color, size}) => (<Ionicons name='star' color={color} size={size}/>), }} />
</Drawer.Navigator>
}
export default function App() {
return (
<>
<StatusBar style = 'dark' />
{/* <FavoritesContextProvider> */}
<Provider store={Store}>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Meals App" component={DrawerNavigator} options={{headerShown: false}}/>
<Stack.Screen name="mealsOverview" component={MealsOverviewScreen}/>
<Stack.Screen name="mealScreen" component={MealScreen}/>
</Stack.Navigator>
</NavigationContainer>
</Provider>
{/*</FavoritesContextProvider>*/}
</>
);
}
const styles = StyleSheet.create({
container: {
},
});