From 93eaee5cccd4ce03500a61f9570dd89ac49e0f99 Mon Sep 17 00:00:00 2001 From: Rayhan Hassou Date: Wed, 15 Nov 2023 11:35:14 +0100 Subject: [PATCH 1/2] 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) { - - )} - - From 48b984929bf46e30372b2f25b435b97e965e0aea Mon Sep 17 00:00:00 2001 From: Rayhan Hassou Date: Wed, 15 Nov 2023 14:03:13 +0100 Subject: [PATCH 2/2] add images and changes somes details --- LeftOvers/assets/images/fruit_icon.png | Bin 0 -> 941 bytes LeftOvers/assets/images/meat_icon.png | Bin 0 -> 1126 bytes LeftOvers/assets/images/vegetable_icon.png | Bin 0 -> 939 bytes LeftOvers/screens/IngredientSelection.tsx | 12 ++++++------ LeftOvers/screens/RecipeSuggestion.tsx | 17 +++++++---------- 5 files changed, 13 insertions(+), 16 deletions(-) create mode 100644 LeftOvers/assets/images/fruit_icon.png create mode 100644 LeftOvers/assets/images/meat_icon.png create mode 100644 LeftOvers/assets/images/vegetable_icon.png diff --git a/LeftOvers/assets/images/fruit_icon.png b/LeftOvers/assets/images/fruit_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4b20059b4751e7e0b07c740fadc953baf9d0f871 GIT binary patch literal 941 zcmV;e15*5nP)9Rx^y^QI?NLUKY{TR1j-cPGjTF>m?yAEnv|{? z>o$9*AIk=t*x28UX6|&W{ci8}PY5$WDYeQG-GBkW$n5BA9cF8rDlk4)5pfq70(n9t z{H%XmoK4b4FbnRT(f|+w_Ps{>db?Qu%0BfF@X)PWSQ+Mq-S8xJ9?XF7Px!a+I#?5u zO_>IT;7u63TCXC&r=b*UVeZP{tvoN#@b~a{7(S+NHp}e?KG%exZ^xqeL@eA-NV_;N z>+Mc!2MwHO9~kIQ)CDs_Yu#tSdNPfVlsQD7Gaq2$z4X2QrMn9wcOMPRX@1Tg*X*Y3 zSiLXr%bBQn1@$yN2y>!TEca69YIiQtI+hvGp(w0^JrR2v5syT~IQ*wboVVUn#Sp#} z8`rW0=GA2H{nCeWg9lK-^cw6kVzYhS3a9CwXt~-_O78Y(c!YC6Vx2v#U0q!?;eW_& zvS1$@&mw(f6XQwg0l6byp;neCB&5)Jw$XAy-PEa`f_kqu40$C)Q);Q)cwVTja*Y9wvJDK(yYvLIP;*C}5yP?Ww5rb~w$Po+npk|0Ojq-1*`-$( zn~2qznCn9P1r`WN%iZy`e0SHob(ZHd5)33|E&-!yIZnwKdpGrBayV`OygYyqd3>b@kh4vTq4FhoH)s3Z4oO~ z{J0eBZHXT5a2z@L<|MV=wYv+xdzZ+NlAJD;GBU>*xeWnC9wvW}T8r91l0m->ix$?? zsy15B^W|?!7ov))!iIJwSOaSb6P}IB#XX(3Cxxm8NqdzPt!gUsu#*|BzityE)s=U* z$WV}R1#-PwUXGE^6YC0ARbFnK_)+qB1Jb{tt?$;dNpL>WwZBDE)FmK9d|Ta3G=^A{|;~40J|*)ExHeRt{|##c_<-mp>J43zhC@JxTvRl^>N}FbbxV P00000NkvXXu0mjf`H89k literal 0 HcmV?d00001 diff --git a/LeftOvers/assets/images/meat_icon.png b/LeftOvers/assets/images/meat_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3eafc6317fc8bfacbff6120ff6753a9b24d12965 GIT binary patch literal 1126 zcmV-s1eyDZP)-zh;M!`4aGCbNc0X!q5JSo^z0Gr9HArSNd z=!P`C-FbD|gC#}H1J#aDH@Q5#*05r&R{{A3Enw7+6P4~e~y3#8lZXIbcBUc<#Yhcf_Ki3LWU|Qh(iMWJ3we>DGS4D?uq%as7Te7N<+e1;b3R? zqy>wD|95dzC!&Vk%<&u{mVRHr0w-5zhYh84Jyot$^cLgo&XQT;%Q)eQle-6=5Bbn**ULuWsRGAS$W;R zN8FZ>CDt`B!#}q&!S6X{l#~!JZa7y@g<)`yRPlk)=xZJp-5MvdpEQ=-voS$ea$_dA zZ}p44xKyTr*&79SCck(asUj}$*@3a9k#LinH zlH}9-vUdVJGCGZiFqQvuSzz%N=Kx)u*Q#Tkc#sTpkumiNa8{6l2P3c`FL&RxNnwFA zetQ|qeyl+~wQi3s#`q5AyW6>>#59S( zi9=9+3~+jAzsVqa?{FmRZMFxv(TeolzP$`ci)*%JUP=x;k%O&5KB%CtlkpQ++tkh_ z+#(&vhk`98i6+dDV6@Q}(8sdgTBQ4KY>e5OxX(KmwQF{B-YNiSeTi<5-R+ho%g}8% zY%t5+eMmAl60{U<{q?B|MJ4M zK!?r)iO43orEcT_mG1u#Vc)e@wh$_w!?NUKe$iUOB03vgM|z=Q@)K;gaE7@q>ShiDV@vp)R{MBOKjiT0T$W zJ`Jl()M-9M9Ma!*Pu^zj@!N6k8`{rz-&7t2K6!|=SsXHDRi{51q(8*qr~O&{uoAe4 zA4jX4DU|Q?_xzDD)XMzI|H9+BUxrS;0!L&sK}}S;KmY&$07*qoM6N<$g7*dvEC2ui literal 0 HcmV?d00001 diff --git a/LeftOvers/assets/images/vegetable_icon.png b/LeftOvers/assets/images/vegetable_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2295c99393f273d88a05a45002ac095cfec4302a GIT binary patch literal 939 zcmV;c162HpP)BzcpMjPj`~u-6Za}Jw?gWSJct-r_8Cl7^s{iZlM>6AChTR>HCm??tuKw) z6){)6-aTC56#~}r`F2{7-Zk{PUD5KvxfkSOwB`CAc;A+C89Nc|H-Hy!~0 z)_LEQsCKMIBeejE_&R}-)LHb0cdP+$6tgKCTlctmV1;TgJIp@R!Y`p4KGc^ZsA7JJ zvQ#wS#?(EHwOTPL)mWHNqe;lfPb(lHez*I^nKweTzy=QkFO~>w- zN{Z@?j`!EM^IG4n1%jh5+tB`plIZy0oi4p*%3-a;h33Zrmx?JVGE*mx8E?t~CTgX? zQNkHC?3}50N1gQxJ!SAB`X#Swk2SyU2hy45VS$#-2G8MsNJ{+`J4v zJP=g5(<_pQ%}iOdVU6d;)%>jIemz(}vl9tF14k*pG3G@Ln81@N3Y_P{t?R^XKj3Eb zTU|Hqvmo9IYk5+1&(hf%>?Qc;2RD-5z=zHZ^B!BMindngNNWpx>4}>S^l76naNQa< zYmX%MEB}PV{rsWTap)Jz7f!h;p}#n?uZ$FjqTWlW2g08Wcv__E{RKfLl&rr9rZ)fp N002ovPDHLkV1l3ht}g%p literal 0 HcmV?d00001 diff --git a/LeftOvers/screens/IngredientSelection.tsx b/LeftOvers/screens/IngredientSelection.tsx index 0dd8546..8500cc5 100644 --- a/LeftOvers/screens/IngredientSelection.tsx +++ b/LeftOvers/screens/IngredientSelection.tsx @@ -8,6 +8,9 @@ import FoodElementText from '../components/FoodElementText'; import CustomButton from '../components/CustomButton'; import plus from '../assets/images/plus.png'; import moins from '../assets/images/minus.png'; +import meat from '../assets/images/meat_icon.png'; +import vegetable from '../assets/images/vegetable_icon.png'; +import fruit from '../assets/images/fruit_icon.png'; export default function IngredientSelection(props) { @@ -44,16 +47,13 @@ const ChooseItem = ({value}: ItemProps) => ( - + - + - - - - + diff --git a/LeftOvers/screens/RecipeSuggestion.tsx b/LeftOvers/screens/RecipeSuggestion.tsx index 4c88f18..6357bb3 100644 --- a/LeftOvers/screens/RecipeSuggestion.tsx +++ b/LeftOvers/screens/RecipeSuggestion.tsx @@ -12,8 +12,6 @@ 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) { @@ -46,6 +44,7 @@ export default function RecipeSuggestion(props) { const handleChildEventGoIngredients = (value) => { setVisibleFilters(false); setVisibleIngredients(true); + console.log("jai change pour iingredient"); } const decreaseCounter = () => { @@ -65,14 +64,8 @@ export default function RecipeSuggestion(props) { const imageElements = limitedList.map((source, index) => ( - - - - - - - - + + )); @@ -139,7 +132,11 @@ export default function RecipeSuggestion(props) { + + )} + +