diff --git a/LeftOvers/App.tsx b/LeftOvers/App.tsx
index 3e99a61..a828d17 100644
--- a/LeftOvers/App.tsx
+++ b/LeftOvers/App.tsx
@@ -17,9 +17,9 @@ export default function App() {
}>
-
-
-
+
+
+
diff --git a/LeftOvers/components/ProfileDetails.tsx b/LeftOvers/components/ProfileDetails.tsx
index 4942d5a..9b7ef35 100644
--- a/LeftOvers/components/ProfileDetails.tsx
+++ b/LeftOvers/components/ProfileDetails.tsx
@@ -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
allergies: list
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) {
{props.name}
- props.navigation.navigate('ProfileModification')}>
+ navigation.navigate('ProfileModification')}>
@@ -56,7 +55,7 @@ export default function ProfileDetails(props: ProfileProps) {
-
+
diff --git a/LeftOvers/navigation/BottomBar.tsx b/LeftOvers/navigation/BottomBar.tsx
index dd4460d..69d4496 100644
--- a/LeftOvers/navigation/BottomBar.tsx
+++ b/LeftOvers/navigation/BottomBar.tsx
@@ -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}
>
diff --git a/LeftOvers/package-lock.json b/LeftOvers/package-lock.json
index 6e908f5..f369f06 100644
--- a/LeftOvers/package-lock.json
+++ b/LeftOvers/package-lock.json
@@ -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"
diff --git a/LeftOvers/package.json b/LeftOvers/package.json
index a224bbe..511aab3 100644
--- a/LeftOvers/package.json
+++ b/LeftOvers/package.json
@@ -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"
diff --git a/LeftOvers/screens/CreateProfile.tsx b/LeftOvers/screens/CreateProfile.tsx
index 864cd33..6cdd97e 100644
--- a/LeftOvers/screens/CreateProfile.tsx
+++ b/LeftOvers/screens/CreateProfile.tsx
@@ -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 (
-
-
+ (console.log("Profile Created"))}>
diff --git a/LeftOvers/screens/HomePage.tsx b/LeftOvers/screens/HomePage.tsx
index e18fe58..d904b4d 100644
--- a/LeftOvers/screens/HomePage.tsx
+++ b/LeftOvers/screens/HomePage.tsx
@@ -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 (
-
-
- LeftOvers
-
-
diff --git a/LeftOvers/screens/ModifyProfile.tsx b/LeftOvers/screens/ModifyProfile.tsx
index e78197c..1272356 100644
--- a/LeftOvers/screens/ModifyProfile.tsx
+++ b/LeftOvers/screens/ModifyProfile.tsx
@@ -16,7 +16,7 @@ export default function ModifyProfile(props) {
-
+ (console.log("Profile Modified"))}>
diff --git a/LeftOvers/screens/Profiles.tsx b/LeftOvers/screens/Profiles.tsx
index 2acef8f..c9c9ba1 100644
--- a/LeftOvers/screens/Profiles.tsx
+++ b/LeftOvers/screens/Profiles.tsx
@@ -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}) {
-
+
-
+
-
+
-
+