From 5ddb3d1d5e383a43f93b3dfc63c2a86b50005084 Mon Sep 17 00:00:00 2001 From: Yoojin93 Date: Mon, 22 Apr 2024 15:05:47 -0500 Subject: [PATCH 1/2] screen updates --- components/FavoriteRecipes.jsx | 2 +- components/RecipeList.jsx | 3 +-- screens/AccountSettingsMenu.jsx | 7 +++--- screens/AcctSavedRecipes.jsx | 44 +++++++++++++++++++++++++++++++++ screens/AddIngredient.jsx | 2 +- screens/Ingredient.jsx | 2 +- screens/Recipe.jsx | 2 +- zbackend/env.txt | 8 ++++++ zbackend/requirements.txt | 4 +++ 9 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 screens/AcctSavedRecipes.jsx create mode 100644 zbackend/env.txt diff --git a/components/FavoriteRecipes.jsx b/components/FavoriteRecipes.jsx index e6afa4c..cfdfd52 100644 --- a/components/FavoriteRecipes.jsx +++ b/components/FavoriteRecipes.jsx @@ -7,7 +7,7 @@ import { useNavigation } from '@react-navigation/native'; const FavoriteRecipesList = ({ title, scrollEnabled, numberOfRecipes }) => { const [recipes, setRecipes] = useState([]); const navigation = useNavigation(); - const { userId } = '8950a7c8-20c3-4d77-9a10-3622e07fd3dd'; + const { userId } = '1'; useEffect(() => { const fetchRecipes = async () => { diff --git a/components/RecipeList.jsx b/components/RecipeList.jsx index 00fd5e5..3382d4e 100644 --- a/components/RecipeList.jsx +++ b/components/RecipeList.jsx @@ -3,12 +3,11 @@ import { Pressable, StyleSheet, Text, View } from 'react-native'; import RecipeCard from './RecipeCard'; import { FlatList } from 'react-native'; import { useNavigation } from '@react-navigation/native'; -import AuthContext from '../auth/auth-context'; const RecipeList = ({ title, scrollEnabled, numberOfRecipes }) => { const [recipes, setRecipes] = useState([]); const navigation = useNavigation(); - const { userId } = useContext(AuthContext); + const { userId } = "1"; useEffect(() => { const fetchRecipes = async () => { diff --git a/screens/AccountSettingsMenu.jsx b/screens/AccountSettingsMenu.jsx index 8c85a5d..2966eae 100644 --- a/screens/AccountSettingsMenu.jsx +++ b/screens/AccountSettingsMenu.jsx @@ -11,8 +11,9 @@ import { } from '@expo/vector-icons'; import { SettingOption } from '../components/SettingOption'; import { useState } from 'react'; -import { DietaryAllergenFilter } from './DietaryAllergenFilter'; +import { DietaryAllergenFilterScreen } from './DietaryAllergenFilter'; import { AccountDetailsScreen } from './AccountDetailsScreen'; +import { AcctSavedRecipesScreen } from './AcctSavedRecipes'; export const SettingsScreen = { AccountSettings: 'AccountSettings', @@ -89,11 +90,11 @@ export const AccountSettingsMenu = () => { )} {screenOption == SettingsScreen.DietaryPreferences && ( - + )} {screenOption == SettingsScreen.MyDetails && } - {screenOption == SettingsScreen.FavoriteRecipes && } + {screenOption == SettingsScreen.FavoriteRecipes && }