fix: some errors from merge corrected and versions of modules modified
continuous-integration/drone/push Build is failing Details

pull/20/head
Rémi REGNAULT 1 year ago
parent ff8bb15315
commit 0b47411de0

@ -17,9 +17,9 @@ export default function App() {
<ThemeProvider>
<NavigationContainer>
<Tab.Navigator initialRouteName='Home' tabBar={ (props) => <BottomBar {...props}/> }>
<Tab.Screen name='Profile' component={ProfilesStackScreen} options={{ headerShown: false }} />
<Tab.Screen name='Home' component={HomeStackScreen} options={{ headerShown: false }}/>
<Tab.Screen name='Cooking' component={CookingStackScreen} options={{ headerShown: false }}/>
<Tab.Screen name='PROFILE' component={ProfilesStackScreen} options={{ headerShown: false, title: 'Home' }} />
<Tab.Screen name='HOME' component={HomeStackScreen} options={{ headerShown: false, title: 'Home' }}/>
<Tab.Screen name='COOKING' component={CookingStackScreen} options={{ headerShown: false, title: 'Cooking' }}/>
</Tab.Navigator>
</NavigationContainer>
</ThemeProvider>

@ -1,5 +1,5 @@
import {React, useState} from 'react';
import {StyleSheet, Text, TextInput, View, Image, Pressable} from 'react-native';
import React, { useState } from 'react';
import {StyleSheet, Text, TextInput, View, Image, Pressable, FlexStyle} from 'react-native';
import ValidateButton from './ValidateButton';
import ListWithoutSelect from './ListWithoutSelect';
import { useNavigation } from '@react-navigation/native';
@ -10,11 +10,10 @@ type ProfileProps = {
diets: list<string>
allergies: list<string>
onDeleteProfile: () => void
navigation
}
export default function ProfileDetails(props: ProfileProps) {
export default function ProfileDetails(props) {
const navigation = useNavigation()
const [display, setDisplay] = useState("none")
const changeListVisibility = () => {
if (display == "none"){
@ -27,10 +26,10 @@ export default function ProfileDetails(props: ProfileProps) {
let imageSource
if (props.avatar == "plus.png"){
if (props.avatar === "plus.png"){
imageSource = require('../assets/images/plus.png')
}
else if (props.avatar == "plus_small.png"){
else if (props.avatar === "plus_small.png"){
imageSource = require('../assets/images/plus_small.png')
}
else{
@ -42,7 +41,7 @@ export default function ProfileDetails(props: ProfileProps) {
<View style={styles.pseudoBar}>
<Image source={imageSource} style={styles.avatar}></Image>
<Text style={styles.text}>{props.name}</Text>
<Pressable onPress={() => props.navigation.navigate('ProfileModification')}>
<Pressable onPress={() => navigation.navigate('ProfileModification')}>
<Image source={require("../assets/images/modify.png")} style={styles.modify}></Image>
</Pressable>
<Pressable onPress={props.onDeleteProfile} style={{flex: 0.1, marginLeft: "1%",}}>
@ -56,7 +55,7 @@ export default function ProfileDetails(props: ProfileProps) {
<Image source={require("../assets/images/arrow.png")} style={styles.arrow}></Image>
</View>
</Pressable>
<View style={{display: display, alignItems: "center", justifyContent: "center"}}>
<View style={{display: display === "flex" ? 'flex' : 'none', alignItems: "center", justifyContent: "center"}}>
<ListWithoutSelect title="Diets" content={props.diets}></ListWithoutSelect>
<View style={{marginTop: "3%"}}/>
<ListWithoutSelect title="Allergies" content={props.allergies}></ListWithoutSelect>

@ -78,11 +78,11 @@ export default function BottomBar({ state, descriptors, navigation }) {
: route.name;
let icon;
if (route.name === 'Home') {
if (route.name === 'HOME') {
icon = HomeIcon;
} else if (route.name === 'Profile') {
} else if (route.name === 'PROFILE') {
icon = ProfileIcon;
} else if (route.name === 'Cooking') {
} else if (route.name === 'COOKING') {
icon = CookingIcon;
}
@ -108,6 +108,7 @@ export default function BottomBar({ state, descriptors, navigation }) {
testID={options.tabBarTestID}
onPress={onPress}
style={[styles.BottomBarElementContainer, { flex: 1 }]}
key={route.name}
>
<Image source={icon} style={[styles.BottomBarIcon, {tintColor: isFocused ? (theme === 'light' ? '#59BDCD': '#8DB4D9'): '#F2F0E4'}]} />
<Text style={{ color: isFocused ? '#59BDCD' : '#F2F0E4' }}>

@ -9,13 +9,13 @@
"version": "1.0.0",
"dependencies": {
"@expo/webpack-config": "^19.0.0",
"@react-native-async-storage/async-storage": "^1.19.7",
"@react-native-async-storage/async-storage": "^1.18.2",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@types/react": "~18.2.14",
"expo": "~49.0.15",
"expo-blur": "^12.6.0",
"expo-blur": "^12.4.1",
"expo-linear-gradient": "~12.3.0",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
@ -24,8 +24,8 @@
"react-native": "0.72.6",
"react-native-dropdown-select-list": "^2.0.5",
"react-native-paper": "^5.11.1",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.27.0",
"react-native-safe-area-context": "^4.6.3",
"react-native-screens": "^3.22.0",
"react-native-splash-screen": "^3.3.0",
"react-native-web": "~0.19.6",
"typescript": "^5.1.3"
@ -3944,14 +3944,14 @@
}
},
"node_modules/@react-native-async-storage/async-storage": {
"version": "1.19.7",
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.7.tgz",
"integrity": "sha512-zvfhOWWnjzeP4exfgNwDUot7MQafEEJnbjjNsVKWRxRuQT521GLSHUJQHjMTLg19QPT+HbsGjL7rJzKkmXuq7w==",
"version": "1.18.2",
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.18.2.tgz",
"integrity": "sha512-dM8AfdoeIxlh+zqgr0o5+vCTPQ0Ru1mrPzONZMsr7ufp5h+6WgNxQNza7t0r5qQ6b04AJqTlBNixTWZxqP649Q==",
"dependencies": {
"merge-options": "^3.0.4"
},
"peerDependencies": {
"react-native": "^0.0.0-0 || >=0.60 <1.0"
"react-native": "^0.0.0-0 || 0.60 - 0.72 || 1000.0.0"
}
},
"node_modules/@react-native-community/cli": {
@ -9213,9 +9213,9 @@
}
},
"node_modules/expo-blur": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/expo-blur/-/expo-blur-12.6.0.tgz",
"integrity": "sha512-yrZYu4mQX4ZJtSrjNVMuB9kCMB8Xerk5Zn5iES6ojmGAk+yxJ/jdyhaUVqbpaA8LBmspdKgQz2dW8+9wa8dSAg==",
"version": "12.4.1",
"resolved": "https://registry.npmjs.org/expo-blur/-/expo-blur-12.4.1.tgz",
"integrity": "sha512-lGN8FS9LuGUlEriULTC62cCWyg5V7zSVQeJ6Duh1wSq8aAETinZ2/7wrT6o+Uhd/XVVxFNON2T25AGCOtMG6ew==",
"peerDependencies": {
"expo": "*"
}
@ -14955,18 +14955,18 @@
}
},
"node_modules/react-native-safe-area-context": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.7.4.tgz",
"integrity": "sha512-3LR3DCq9pdzlbq6vsHGWBFehXAKDh2Ljug6jWhLWs1QFuJHM6AS2+mH2JfKlB2LqiSFZOBcZfHQFz0sGaA3uqg==",
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.6.3.tgz",
"integrity": "sha512-3CeZM9HFXkuqiU9HqhOQp1yxhXw6q99axPWrT+VJkITd67gnPSU03+U27Xk2/cr9XrLUnakM07kj7H0hdPnFiQ==",
"peerDependencies": {
"react": "*",
"react-native": "*"
}
},
"node_modules/react-native-screens": {
"version": "3.27.0",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.27.0.tgz",
"integrity": "sha512-FzSUygZ7yLQyhDJZsl7wU68LwRpVtVdqOPWribmEU3Tf26FohFGGcfJx1D8lf2V2Teb8tI+IaLnXCKbyh2xffA==",
"version": "3.22.0",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.22.0.tgz",
"integrity": "sha512-csLypBSXIt/egh37YJmokETptZJCtZdoZBsZNLR9n31GesDyVogprT+MM22dEPDuxPxt/mFWq+lSpVwk7khuTw==",
"dependencies": {
"react-freeze": "^1.0.0",
"warn-once": "^0.1.0"
@ -20487,9 +20487,9 @@
}
},
"@react-native-async-storage/async-storage": {
"version": "1.19.7",
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.19.7.tgz",
"integrity": "sha512-zvfhOWWnjzeP4exfgNwDUot7MQafEEJnbjjNsVKWRxRuQT521GLSHUJQHjMTLg19QPT+HbsGjL7rJzKkmXuq7w==",
"version": "1.18.2",
"resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-1.18.2.tgz",
"integrity": "sha512-dM8AfdoeIxlh+zqgr0o5+vCTPQ0Ru1mrPzONZMsr7ufp5h+6WgNxQNza7t0r5qQ6b04AJqTlBNixTWZxqP649Q==",
"requires": {
"merge-options": "^3.0.4"
}
@ -24414,9 +24414,9 @@
}
},
"expo-blur": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/expo-blur/-/expo-blur-12.6.0.tgz",
"integrity": "sha512-yrZYu4mQX4ZJtSrjNVMuB9kCMB8Xerk5Zn5iES6ojmGAk+yxJ/jdyhaUVqbpaA8LBmspdKgQz2dW8+9wa8dSAg==",
"version": "12.4.1",
"resolved": "https://registry.npmjs.org/expo-blur/-/expo-blur-12.4.1.tgz",
"integrity": "sha512-lGN8FS9LuGUlEriULTC62cCWyg5V7zSVQeJ6Duh1wSq8aAETinZ2/7wrT6o+Uhd/XVVxFNON2T25AGCOtMG6ew==",
"requires": {}
},
"expo-constants": {
@ -28640,15 +28640,15 @@
}
},
"react-native-safe-area-context": {
"version": "4.7.4",
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.7.4.tgz",
"integrity": "sha512-3LR3DCq9pdzlbq6vsHGWBFehXAKDh2Ljug6jWhLWs1QFuJHM6AS2+mH2JfKlB2LqiSFZOBcZfHQFz0sGaA3uqg==",
"version": "4.6.3",
"resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-4.6.3.tgz",
"integrity": "sha512-3CeZM9HFXkuqiU9HqhOQp1yxhXw6q99axPWrT+VJkITd67gnPSU03+U27Xk2/cr9XrLUnakM07kj7H0hdPnFiQ==",
"requires": {}
},
"react-native-screens": {
"version": "3.27.0",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.27.0.tgz",
"integrity": "sha512-FzSUygZ7yLQyhDJZsl7wU68LwRpVtVdqOPWribmEU3Tf26FohFGGcfJx1D8lf2V2Teb8tI+IaLnXCKbyh2xffA==",
"version": "3.22.0",
"resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.22.0.tgz",
"integrity": "sha512-csLypBSXIt/egh37YJmokETptZJCtZdoZBsZNLR9n31GesDyVogprT+MM22dEPDuxPxt/mFWq+lSpVwk7khuTw==",
"requires": {
"react-freeze": "^1.0.0",
"warn-once": "^0.1.0"

@ -10,13 +10,13 @@
},
"dependencies": {
"@expo/webpack-config": "^19.0.0",
"@react-native-async-storage/async-storage": "^1.19.7",
"@react-native-async-storage/async-storage": "^1.18.2",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@types/react": "~18.2.14",
"expo": "~49.0.15",
"expo-blur": "^12.6.0",
"expo-blur": "^12.4.1",
"expo-linear-gradient": "~12.3.0",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
@ -25,8 +25,8 @@
"react-native": "0.72.6",
"react-native-dropdown-select-list": "^2.0.5",
"react-native-paper": "^5.11.1",
"react-native-safe-area-context": "^4.7.4",
"react-native-screens": "^3.27.0",
"react-native-safe-area-context": "^4.6.3",
"react-native-screens": "^3.22.0",
"react-native-splash-screen": "^3.3.0",
"react-native-web": "~0.19.6",
"typescript": "^5.1.3"

@ -11,13 +11,12 @@ export default function CreateProfile(props) {
const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}]
return (
<SafeAreaProvider style={{flex: 1}}>
<TopBar title="Create Profile" isVisible="true"/>
<ScrollView>
<LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
<View style={{marginTop: "6%"}}/>
<ProfileModification name="" avatar="plus_small.png" diets={die} allergies={all}></ProfileModification>
<View style={{marginTop: "3%"}}/>
<ValidateButton title="Create Profile" image="plus.png" colour="#ACA279" backColour="#F2F0E4"></ValidateButton>
<ValidateButton title="Create Profile" image="plus.png" colour="#ACA279" backColour="#F2F0E4" todo={() => (console.log("Profile Created"))}></ValidateButton>
<View style={{marginTop: "20%"}}/>
</LinearGradient>
</ScrollView>

@ -1,19 +1,16 @@
import React from 'react';
import { useState } from 'react';
import {StyleSheet, View, Text, Pressable, Image, ScrollView, SafeAreaView} from 'react-native';
import ProfileModification from '../components/ProfileModification';
import React, { useState } from 'react';
import { StyleSheet, View, Text, Pressable, Image, ScrollView } from 'react-native';
import {LinearGradient} from 'expo-linear-gradient';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import ValidateButton from '../components/ValidateButton';
import TopBar from '../components/TopBar';
import ListSelect from '../components/ListSelect';
import ListWithoutSelect from '../components/ListWithoutSelect';
import ProfileSelection from '../components/ProfileSelection';
import FoodElementText from '../components/FoodElementText';
import {LinearGradient} from 'expo-linear-gradient';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import bracketLeft from '../assets/images/angle_bracket_left.png';
import bracketRight from '../assets/images/angle_bracket_right.png';
export default function HomePage({ navigation , props}) {
export default function HomePage({ navigation, props }) {
const profiles = [
{name: "Johnny Silverhand", avatar: "plus_small.png", isActive: "flex"},
{name: "Panam Palmer", avatar: "plus_small.png", isActive: "none"},
@ -44,11 +41,6 @@ export default function HomePage({ navigation , props}) {
return (
<SafeAreaProvider style={{flex: 1}}>
<ScrollView>
<View style={styles.topBar}>
<Image source={require("../assets/images/logo.png")} style={{width: "100%", height: "100%", flex: 0.1, marginLeft: "5%", resizeMode: "contain"}}/>
<Text style={styles.appName}>LeftOvers</Text>
<Image source={require("../assets/images/logo.png")} style={{width: "100%", height: "100%", flex: 0.1, marginRight: "5%", resizeMode: "contain"}}/>
</View>
<LinearGradient colors={['#2680AA', '#59BDCD']} style={styles.linearGradient}>
<View style={styles.separator}/>
<View style={styles.welcome}>

@ -16,7 +16,7 @@ export default function ModifyProfile(props) {
<View style={{marginTop: "6%"}}/>
<ProfileModification name="Johnny Silverhand" avatar="plus_small.png" diets={die} allergies={all}></ProfileModification>
<View style={{marginTop: "3%"}}/>
<ValidateButton title="Update Profile" image="update.png" colour="#ACA279" backColour="#F2F0E4"></ValidateButton>
<ValidateButton title="Update Profile" image="update.png" colour="#ACA279" backColour="#F2F0E4" todo={() => (console.log("Profile Modified"))}></ValidateButton>
<View style={{marginBottom: "20%"}}/>
</LinearGradient>
</ScrollView>

@ -1,13 +1,13 @@
import React from 'react';
import { useState } from 'react';
import { StyleSheet, View, Modal, Pressable, Text, Image, ScrollView } from 'react-native';
import {LinearGradient} from 'expo-linear-gradient';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import React, { useState } from 'react';
import { StyleSheet, View, Modal, Pressable, Text, Image, ScrollView, useWindowDimensions } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import ProfileDetails from '../components/ProfileDetails';
import ProfileDelete from '../components/ProfileDelete';
export default function Profiles({props, navigation}) {
export default function Profiles({navigation, props}) {
const allJohnny = [{value: "Coconut"}, {value: "Skimmed Milk"}, {value: "Nuts"}]
const dieJohnny = [{value: "Gluten free"}, {value: "Porkless"}, {value: "Pescatarian"}]
@ -37,13 +37,33 @@ export default function Profiles({props, navigation}) {
<View style={{opacity: opacity, height: "100%", width: "100%", flex: 1, backgroundColor: '#3F3C42',}}>
<LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
<View style={styles.separator}/>
<ProfileDetails name="Johnny Silverhand" avatar="plus_small.png" diets={dieJohnny} allergies={allJohnny} onDeleteProfile={raisePopUp} navigation={navigation}></ProfileDetails>
<ProfileDetails
name="Johnny Silverhand"
avatar="plus_small.png"
diets={dieJohnny}
allergies={allJohnny}
onDeleteProfile={raisePopUp}/>
<View style={styles.separator}/>
<ProfileDetails name="Jackie Welles" avatar="plus_small.png" diets={dieJackie} allergies={allJackie} onDeleteProfile={raisePopUp} navigation={navigation}></ProfileDetails>
<ProfileDetails
name="Jackie Welles"
avatar="plus_small.png"
diets={dieJackie}
allergies={allJackie}
onDeleteProfile={raisePopUp} />
<View style={styles.separator}/>
<ProfileDetails name="Goro Takemura" avatar="plus_small.png" diets={dieGoro} allergies={allGoro} onDeleteProfile={raisePopUp} navigation={navigation}></ProfileDetails>
<ProfileDetails
name="Goro Takemura"
avatar="plus_small.png"
diets={dieGoro}
allergies={allGoro}
onDeleteProfile={raisePopUp} />
<View style={styles.separator}/>
<ProfileDetails name="Viktor Vector" avatar="plus_small.png" diets={dieViktor} allergies={allViktor} onDeleteProfile={raisePopUp} navigation={navigation}></ProfileDetails>
<ProfileDetails
name="Viktor Vector"
avatar="plus_small.png"
diets={dieViktor}
allergies={allViktor}
onDeleteProfile={raisePopUp} />
<View style={styles.modal}>
<Modal visible={visible} onRequestClose={erasePopUp} animationType="fade" transparent={true}>
<View style={styles.modal}>

Loading…
Cancel
Save