|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import {StyleSheet, View, Image, Text } from 'react-native';
|
|
|
|
|
import {StyleSheet, View, Image, Text, Pressable } from 'react-native';
|
|
|
|
|
import ProfileModification from './components/ProfileModification';
|
|
|
|
|
import ValidateButton from './components/ValidateButton';
|
|
|
|
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
|
|
@ -8,11 +8,16 @@ import RecipeDetails from './screens/RecipeDetails';
|
|
|
|
|
import IngredientSelection from './screens/IngredientSelection';
|
|
|
|
|
import { NavigationContainer } from '@react-navigation/native';
|
|
|
|
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
|
|
|
import { BlurView } from 'expo-blur';
|
|
|
|
|
|
|
|
|
|
import HomeStackScreen from './navigation/HomeStackScreen';
|
|
|
|
|
import ProfilesStackScreen from './navigation/ProfileStackScreen';
|
|
|
|
|
import CookingStackScreen from './navigation/CookingStackScreen';
|
|
|
|
|
|
|
|
|
|
import HomeIcon from './assets/images/home.png';
|
|
|
|
|
import ProfileIcon from './assets/images/person_icon.png';
|
|
|
|
|
import CookingIcon from './assets/images/cook.png';
|
|
|
|
|
|
|
|
|
|
const Tab = createBottomTabNavigator();
|
|
|
|
|
|
|
|
|
|
export default function App() {
|
|
|
|
@ -42,16 +47,53 @@ export default function App() {
|
|
|
|
|
// return list;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// const ingredients = generateList();
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<NavigationContainer>
|
|
|
|
|
<Tab.Navigator screenOptions={{ headerShown: false }} initialRouteName='Home'>
|
|
|
|
|
<Tab.Navigator
|
|
|
|
|
initialRouteName='Home'
|
|
|
|
|
screenOptions={({ route }) => ({
|
|
|
|
|
tabBarIcon: ({ focused }) => {
|
|
|
|
|
let icon;
|
|
|
|
|
|
|
|
|
|
if (route.name === 'Home') {
|
|
|
|
|
icon = HomeIcon;
|
|
|
|
|
} else if (route.name === 'Profile') {
|
|
|
|
|
icon = ProfileIcon;
|
|
|
|
|
} else if (route.name === 'Cooking') {
|
|
|
|
|
icon = CookingIcon;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// You can return any component that you like here!
|
|
|
|
|
return <Image source={icon} style={{width: 35, height: 35}} tintColor={focused ? '#59BDCD' : '#F2F0E4'}/>;
|
|
|
|
|
},
|
|
|
|
|
tabBarActiveTintColor: '#59BDCD',
|
|
|
|
|
tabBarInactiveTintColor: '#F2F0E4',
|
|
|
|
|
headerShown: false,
|
|
|
|
|
tabBarStyle: {position: 'absolute', height: 70},
|
|
|
|
|
tabBarBackground: () => (
|
|
|
|
|
<BlurView tint="dark"
|
|
|
|
|
intensity={50}
|
|
|
|
|
style={[
|
|
|
|
|
StyleSheet.absoluteFill,
|
|
|
|
|
{
|
|
|
|
|
borderBlockColor: '#F2F0E4',
|
|
|
|
|
borderWidth: 3,
|
|
|
|
|
borderLeftColor: '#F2F0E4',
|
|
|
|
|
borderLeftWidth: 3,
|
|
|
|
|
borderRightColor: '#F2F0E4',
|
|
|
|
|
borderRightWidth: 3
|
|
|
|
|
}
|
|
|
|
|
]}/>
|
|
|
|
|
),
|
|
|
|
|
tabBarItemStyle: {marginVertical: 5},
|
|
|
|
|
tabBarLabelStyle: {fontSize: 15}
|
|
|
|
|
})}>
|
|
|
|
|
<Tab.Screen name='Profile' component={ProfilesStackScreen}/>
|
|
|
|
|
<Tab.Screen name='Home' component={HomeStackScreen} />
|
|
|
|
|
<Tab.Screen name='Cooking' component={CookingStackScreen}/>
|
|
|
|
|
</Tab.Navigator>
|
|
|
|
|
</NavigationContainer>
|
|
|
|
|
|
|
|
|
|
// <IngredientSelection listIngredient={ingredients}></IngredientSelection>
|
|
|
|
|
/*<RecipeSuggestion list={ingredients} diets={die} allergy={all}></RecipeSuggestion>*/
|
|
|
|
|
/*<RecipeDetails ingredient={ingredient}
|
|
|
|
|