From 93eaee5cccd4ce03500a61f9570dd89ac49e0f99 Mon Sep 17 00:00:00 2001 From: Rayhan Hassou Date: Wed, 15 Nov 2023 11:35:14 +0100 Subject: [PATCH] upgrade some component and changes somes images --- LeftOvers/App.tsx | 8 ++- LeftOvers/naviguation/parameter.png | Bin 410 -> 0 bytes LeftOvers/screens/IngredientSelection.tsx | 82 ++++++++-------------- LeftOvers/screens/RecipeSuggestion.tsx | 17 +++-- 4 files changed, 45 insertions(+), 62 deletions(-) delete mode 100644 LeftOvers/naviguation/parameter.png diff --git a/LeftOvers/App.tsx b/LeftOvers/App.tsx index 02e37c5..8a8b1b2 100644 --- a/LeftOvers/App.tsx +++ b/LeftOvers/App.tsx @@ -5,6 +5,7 @@ import ValidateButton from './components/ValidateButton'; import { LinearGradient } from 'expo-linear-gradient'; import RecipeSuggestion from './screens/RecipeSuggestion'; import RecipeDetails from './screens/RecipeDetails'; +import IngredientSelection from './screens/IngredientSelection'; export default function App() { const all = [{value: "Mussels"}, {value: "Skimmed Milk"}, {value: "Nuts"}] @@ -36,14 +37,15 @@ export default function App() { const ingredients = generateList(); return ( - /* */ - + /**/ + /* + >*/ ); } diff --git a/LeftOvers/naviguation/parameter.png b/LeftOvers/naviguation/parameter.png deleted file mode 100644 index 08425b498d677ebd915c1bb20acb5317f0d496b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 410 zcmV;L0cHM)P)ruH;2LDpaQJ`Qh{S7jukLe;Lw0M26TKAEAZ^V0?7UDnFN#Y;yxs^ zd*ANu{kwvW*|8ncnD^S35Jv9R9h!{kCKbJ2+VWwBT}I+(dOiOH#S`H}APWukPXys9 zSPM8+yuaN)kHn7WOB$^3PYcAoq2ZzxCA}cbXYPWkPPsIZbA91HQFqr$Q`iQK~GB z$2s9L-nf0q2ZD}u=N2T~>~?O`WX{$|vDTjT3Vd~m9~R|_oVka=VgLXD07*qoM6N<$ Ef__h{jsO4v diff --git a/LeftOvers/screens/IngredientSelection.tsx b/LeftOvers/screens/IngredientSelection.tsx index 6e8fa0a..0dd8546 100644 --- a/LeftOvers/screens/IngredientSelection.tsx +++ b/LeftOvers/screens/IngredientSelection.tsx @@ -6,14 +6,36 @@ import { Searchbar } from 'react-native-paper'; import brochette from '../assets/images/brochette.png'; import FoodElementText from '../components/FoodElementText'; import CustomButton from '../components/CustomButton'; +import plus from '../assets/images/plus.png'; +import moins from '../assets/images/minus.png'; -export default function IngredientSelection() { +export default function IngredientSelection(props) { const [searchQuery, setSearchQuery] = React.useState(''); const onChangeSearch = query => setSearchQuery(query); + type ItemProps = {value: string} + + const AvailaibleItem = ({value}: ItemProps) => ( + <> + + + + + +) + +const ChooseItem = ({value}: ItemProps) => ( + <> + + + + + +) + return ( @@ -49,70 +71,26 @@ export default function IngredientSelection() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {props.listIngredient.map((source, index) => ( + + ))} - Available - + - - - - - - - - - - - - - - - - - + {props.listIngredient.map((source, index) => ( + + ))} diff --git a/LeftOvers/screens/RecipeSuggestion.tsx b/LeftOvers/screens/RecipeSuggestion.tsx index 6357bb3..4c88f18 100644 --- a/LeftOvers/screens/RecipeSuggestion.tsx +++ b/LeftOvers/screens/RecipeSuggestion.tsx @@ -12,6 +12,8 @@ import bracketLeft from '../assets/images/angle_bracket_left.png'; import bracketRight from '../assets/images/angle_bracket_right.png'; import CustomButton from '../components/CustomButton'; import DietsTab from '../components/DietsTab'; +import plus from '../assets/images/plus.png'; +import moins from '../assets/images/minus.png'; export default function RecipeSuggestion(props) { @@ -44,7 +46,6 @@ export default function RecipeSuggestion(props) { const handleChildEventGoIngredients = (value) => { setVisibleFilters(false); setVisibleIngredients(true); - console.log("jai change pour iingredient"); } const decreaseCounter = () => { @@ -64,8 +65,14 @@ export default function RecipeSuggestion(props) { const imageElements = limitedList.map((source, index) => ( - - + + + + + + + + )); @@ -132,11 +139,7 @@ export default function RecipeSuggestion(props) { - - )} - -