merge with master
continuous-integration/drone/push Build is passing Details

pull/23/head
Rémi REGNAULT 1 year ago
commit 6e9baa413e

@ -23,25 +23,22 @@ const styles = StyleSheet.create({
width : 150, width : 150,
height: 40, height: 40,
borderRadius: 4, borderRadius: 4,
elevation: 3, backgroundColor: '#F2F0E4',
backgroundColor: 'rgba(0, 0, 0, 0.7)',
}, },
text: { text: {
fontSize: 15, fontSize: 15,
lineHeight: 21,
fontWeight: 'bold', fontWeight: 'bold',
letterSpacing: 0.25, color: '#ACA279',
color: 'white',
}, },
view: { view: {
width : 145, width : 145,
height: 35, height: 35,
borderRadius: 4, borderRadius: 4,
elevation: 3,
borderWidth: 1, borderWidth: 1,
borderColor: 'grey', borderColor: '#ACA279',
alignItems: 'center', // Centre le contenu verticalement alignItems: 'center',
justifyContent: 'center', // Centre le contenu horizontalement justifyContent: 'center',
margin: "1%",
}, },
}); });

@ -21,33 +21,39 @@ export default function FoodElementText(props : foodElementImageProps) {
width: "80%", width: "80%",
borderRadius: 5, borderRadius: 5,
backgroundColor: colors.carrouselBackground, backgroundColor: colors.carrouselBackground,
marginHorizontal: "3%",
}, },
text: { text: {
fontSize: 10, fontSize: 15,
fontWeight: 'bold', lineHeight: 20,
padding : "2%", fontWeight: 'bold',
color: colors.cardDetail, padding : "3%",
color: colors.cardDetail,
}, },
view: { view: {
alignItems: 'flex-start', alignItems: 'flex-start',
justifyContent: 'center', justifyContent: 'center',
marginRight: "3%",
width: "100%"
}, },
container: { container: {
width: "100%", width: "100%",
borderRadius: 5, height: 50,
borderWidth: 1, borderRadius: 5,
borderColor: colors.cardDetail, borderWidth: 2,
flexDirection: 'column', borderColor: colors.cardDetail,
justifyContent: 'center', flexDirection: 'row',
justifyContent: 'space-between',
}, },
}); });
return ( return (
<Pressable style={styles.button}> <Pressable style={styles.button}>
<View style={styles.container}> <View style={styles.container}>
<View style={styles.view}> <View style={styles.view}>
<Text style={styles.text}>{props.title}</Text> <Text style={styles.text}>{props.title}</Text>
</View> <Separator/>
</View> </View>
</Pressable> </View>
</Pressable>
); );
} }

@ -0,0 +1,50 @@
import React from 'react';
import {StyleSheet,Pressable, Text, View, Image} from 'react-native';
import Separator from '../components/Separator';
interface foodElementTextProps {
title: string
}
export default function FoodElementTextSimple(props: foodElementTextProps) {
return (
<Pressable style={styles.button}>
<View style={styles.container}>
<View style={styles.view}>
<Text style={styles.text}>{props.title}</Text>
</View>
</View>
</Pressable>
);
}
const styles = StyleSheet.create({
button: {
alignItems: 'center',
justifyContent: 'center',
width: "80%",
borderRadius: 5,
backgroundColor: '#E3DEC9',
},
text: {
fontSize: 10,
fontWeight: 'bold',
padding : "2%",
color: 'black',
},
view: {
alignItems: 'flex-start',
justifyContent: 'center',
},
container: {
width: "100%",
borderRadius: 5,
borderWidth: 1,
borderColor: '#3F3C42',
flexDirection: 'column',
justifyContent: 'center',
},
});

@ -1,27 +1,19 @@
import React from 'react'; import React from 'react';
import { Appbar } from 'react-native-paper'; import { Appbar } from 'react-native-paper';
interface TopBarProps{ interface ParameterTopBarProps{
source : string onEventIngredient: () => void
firstImage : string onEventFilter: () => void
lastImage : string colorIngredients: string
} colorFilters: string
}
export default function ParameterTopBar(props : any) { export default function ParameterTopBar(props : ParameterTopBarProps) {
const goFilter = () =>{
props.onEventFilter('Hello');
}
const goIngredients = () =>{
props.onEventIngredient('Hello');
}
return ( return (
<Appbar.Header style={{backgroundColor: '#F2F0E4', justifyContent: 'center'}} > <Appbar.Header style={{backgroundColor: '#F2F0E4', height: "10%", justifyContent: "center", borderTopLeftRadius: 20, borderTopRightRadius: 20,}}>
<Appbar.Action icon="magnify" onPress={goIngredients} /> <Appbar.Action icon="magnify" onPress={props.onEventIngredient} color={props.colorIngredients}/>
<Appbar.Action icon="dots-vertical" onPress={goFilter} /> <Appbar.Action icon="dots-vertical" onPress={props.onEventFilter} color={props.colorFilters}/>
</Appbar.Header> </Appbar.Header>
); );
} }

@ -15,7 +15,7 @@ type ProfileSelectionProps = {
type Profile = { type Profile = {
name: string name: string
avatar: string avatar: string
isActive: boolean isActive: string
} }
export default function ProfileSelection(props: ProfileSelectionProps) { export default function ProfileSelection(props: ProfileSelectionProps) {

@ -6,63 +6,40 @@ import Union_right from '../assets/images/Union_right.png';
import background from '../assets/images/Background.png'; import background from '../assets/images/Background.png';
interface recipeElementProps { interface recipeElementProps {
number : number number: string
title : string title: string
description : string textList: string[]
imageList : string[] description: string
image : string
} }
export default function RecipeElement(props : any) { export default function RecipeElement(props: recipeElementProps) {
const totalContentCount = props.imageList.length + 11;
const dynamicHeight = totalContentCount * 40;
const scrollViewHeight = 100;
return ( return (
<Pressable style={[styles.button, { height: dynamicHeight }]}> <Pressable style={styles.button}>
<View style={[styles.view, { height: dynamicHeight - 10}]}> <View style={styles.view}>
<Text style={styles.text}>{props.number}</Text> <Text style={styles.text}>{props.number}</Text>
<Text style={styles.title}>{props.title}</Text> <Text style={styles.title}>{props.title}</Text>
<Image source={props.image ? props.image : brochette} style={{ width: 100, height: 100 }}/> <Image source={props.image ? props.image : brochette} style={{width: 100, resizeMode: "contain"}}/>
<View style={styles.horizontalAlignement}> <View style={styles.horizontalAlignment}>
<Image source={Union_left} style={{ width: 70, height: 4, marginRight: 6 }} /> <Image source={Union_left} style={{width: "25%", marginRight: "3%", resizeMode: "contain"}} />
<Text style={styles.text}>Ingredients</Text> <Text style={styles.text}>Ingredients</Text>
<Image source={Union_right} style={{ width: 70, height: 4, marginLeft: 6 }} /> <Image source={Union_right} style={{ width: "25%", marginLeft: "3%", resizeMode: "contain"}} />
</View> </View>
<View style={styles.horizontalAlignment}>
<View style={styles.horizontalAlignement}> {props.textList.length > 0 && props.textList.map((source, index) => (
{props.imageList.length > 0 && props.imageList.map((source, index) => ( <Text key={index} style={styles.smallText}>- {source.title} -</Text>
<Image key={index} source={source} style={{ width: 40, height: 40 }} /> ))}
))}
</View> </View>
{props.imageList.length <= 0 ? (
<View style={styles.horizontalAlignement}>
{props.textList.length > 0 && props.textList.map((source, index) => (
<Text key={index} style={styles.smallText}>{source}</Text>
))}
</View>
) : null}
<View style={styles.scrollViewContainer}> <View style={styles.scrollViewContainer}>
<SafeAreaView> <View style={styles.horizontalAlignment}>
<View style={styles.horizontalAlignement}> <Image source={Union_left} style={{width: "27%", marginRight: "3%", resizeMode: "contain"}}/>
<Image source={Union_left} style={{ width: 70, height: 4, marginRight: 6 }} /> <Text style={styles.text}>Description</Text>
<Text style={styles.text}>Description</Text> <Image source={Union_right} style={{width: "27%", marginLeft: "3%", resizeMode: "contain"}}/>
<Image source={Union_right} style={{ width: 70, height: 4, marginLeft: 6 }} />
</View> </View>
<ScrollView style={{ marginTop: 5, height: scrollViewHeight }}> <ScrollView style={{marginTop: "3%", overflow: "hidden"}}>
<Text style={styles.smallText}>{props.description}</Text> <Text style={styles.smallText}>{props.description}</Text>
</ScrollView> </ScrollView>
</SafeAreaView>
</View> </View>
<Image source={background} style={{width: "80%", resizeMode: "contain"}}></Image>
<Image source={background} style={{width: 210, height: 20, marginTop: dynamicHeight - 50, position: 'absolute'}}></Image>
</View> </View>
</Pressable> </Pressable>
); );
@ -73,54 +50,47 @@ const styles = StyleSheet.create({
button: { button: {
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
width : 300, width: 300,
height: "90%",
borderRadius: 40, borderRadius: 40,
elevation: 3,
backgroundColor: '#E3DEC9', backgroundColor: '#E3DEC9',
}, },
text: { text: {
fontSize: 14, fontSize: 15,
lineHeight: 21,
fontWeight: 'bold', fontWeight: 'bold',
letterSpacing: 0.25,
color: '#756C28', color: '#756C28',
marginTop: 10, marginTop: "4%",
}, },
smallText: { smallText: {
fontSize: 12, fontSize: 12,
lineHeight: 21,
fontWeight: 'bold',
letterSpacing: 0.25,
color: '#71662A', color: '#71662A',
textAlign: "center", textAlign: "center",
margin : 5 margin : "2%"
}, },
title:{ title:{
fontSize: 18, fontSize: 18,
lineHeight: 21,
fontWeight: 'bold', fontWeight: 'bold',
letterSpacing: 0.25,
color: '#524B1A', color: '#524B1A',
}, },
view: { view: {
width : 290, width : "95%",
height: "96.5%",
borderRadius: 40, borderRadius: 40,
elevation: 3,
borderWidth: 2, borderWidth: 2,
borderColor: 'grey', padding: "5%",
alignItems: 'center', // Centre le contenu verticalement borderColor: '#73692A',
display: "flex", alignItems: 'center',
flexWrap: "wrap", justifyContent: "center",
}, },
horizontalAlignement: { horizontalAlignment: {
display: "flex", display: "flex",
flexDirection : 'row', flexDirection : 'row',
alignItems: 'center', alignItems: 'center',
justifyContent: 'space-between', justifyContent: 'space-between',
marginTop : 5, marginTop : "2%",
flexWrap: 'wrap', flexWrap: 'wrap',
}, },
scrollViewContainer: { scrollViewContainer: {
flex: 1, // Assurez-vous que le reste du contenu occupe l'espace restant flex: 1,
}, },
}); });

@ -7,25 +7,22 @@ import background from '../assets/images/Background.png';
interface recipeElementReduceProps { interface recipeElementReduceProps {
number : number number : number
title : string title : string
image : string image : string | null
duree : string duration : string
} }
export default function RecipeElementReduce(props: recipeElementReduceProps) {
export default function RecipeElementReduce(props : any) {
return ( return (
<Pressable style={styles.button}> <View style={styles.button}>
<View style={styles.view}> <View style={styles.view}>
<Text style={styles.text}>{props.number}</Text> <Text style={styles.text}>{props.number}</Text>
<Text style={styles.title}>{props.title}</Text> <Text style={styles.title}>{props.title}</Text>
<Image source={props.image ? props.image : brochette} style={{ width: 100, height: 100 }}/> <Image source={props.image ? props.image : brochette} style={{ width: 100, height: 100, resizeMode: "contain", zIndex: 2}}/>
<View style={{marginTop: 200, position: 'absolute'}}> <View style={{marginBottom: "20%"}}/>
<Image source={background} style={{width: 210, height: 20}}></Image> <Image source={background} style={{width: "80%", resizeMode: "contain", position: "absolute", zIndex: 1, top: "90%"}}></Image>
<Text style={styles.smallText}>{props.duree}</Text> <Text style={styles.smallText}>{props.duration}</Text>
</View>
</View> </View>
</Pressable> </View>
); );
} }
@ -37,48 +34,39 @@ const styles = StyleSheet.create({
width : 250, width : 250,
height: 250, height: 250,
borderRadius: 40, borderRadius: 40,
elevation: 3,
backgroundColor: '#E3DEC9', backgroundColor: '#E3DEC9',
}, },
text: { text: {
fontSize: 14, fontSize: 15,
lineHeight: 21,
fontWeight: 'bold', fontWeight: 'bold',
letterSpacing: 0.25,
color: '#756C28', color: '#756C28',
marginTop: 10, marginTop: "4%",
zIndex: 2
}, },
smallText: { smallText: {
position: 'absolute', position: "absolute",
textAlign: 'center', fontSize: 12,
left: 0, color: '#F2F0E4',
right: 0, textAlign: "center",
marginHorizontal: 'auto', margin : "2%",
color: '#E3DEC9', zIndex: 2,
fontWeight: "bold",
top: "89.25%"
}, },
title:{ title:{
fontSize: 18, fontSize: 18,
lineHeight: 21, fontWeight: 'bold',
fontWeight: 'bold', color: '#524B1A',
letterSpacing: 0.25, zIndex: 2
color: '#524B1A',
}, },
view: { view: {
width : 240, width : "95%",
height: 240, height: "95%",
borderRadius: 40, borderRadius: 40,
elevation: 3, borderWidth: 2,
borderWidth: 2, padding: "5%",
borderColor: 'grey', borderColor: '#73692A',
alignItems: 'center', // Centre le contenu verticalement alignItems: 'center',
display: "flex", justifyContent: "center",
flexWrap: "wrap",
}, },
horizontalAlignement: {
display: "flex",
flexDirection : 'row',
alignItems: 'center',
marginTop: 10,
}
}); });

@ -1,58 +1,51 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { View, StyleSheet, Pressable, Image, Text } from 'react-native'; import {View, StyleSheet, Pressable, Image, Text} from 'react-native';
import bracketLeft from '../assets/images/angle_bracket_left.png'; import bracketLeft from '../assets/images/angle_bracket_left.png';
import bracketRight from '../assets/images/angle_bracket_right.png'; import bracketRight from '../assets/images/angle_bracket_right.png';
import parameter from '../assets/images/parameter.png'; import parameter from '../assets/images/parameter.png';
import FoodElementText from './FoodElementText'; import FoodElementText from './FoodElementText';
interface SelectedIngredientProps { interface SelectedIngredientProps {
listeIngredient: string[]; ingredientList: string[]
listeImage: string[]; onEvent: () => void
onEvent: (value: string) => void;
} }
export default function SelectedIngredient(props: SelectedIngredientProps) { export default function SelectedIngredient(props: SelectedIngredientProps) {
const [cpt, setCpt] = useState(0); const [cpt, setCpt] = useState(0);
const decreaseCounter = () => { const decreaseCounter = () => {
if (cpt > 0) { if(cpt > 0){
setCpt(cpt - 1); setCpt(cpt - 1);
} else { }
setCpt(props.listeIngredient.length - 1); else{
setCpt(props.ingredientList.length - 1);
} }
}; };
const increaseCounter = () => { const increaseCounter = () => {
if (cpt < props.listeIngredient.length - 1) { if(cpt < props.ingredientList.length - 1){
setCpt(cpt + 1); setCpt(cpt + 1);
} else { }
else{
setCpt(0); setCpt(0);
} }
}; };
const handlePress = () => {
// Supposons que vous voulez envoyer la valeur 'Hello' au parent
props.onEvent('Hello');
};
return ( return (
<View style={styles.view}> <View style={styles.view}>
<View id="Top" style={styles.horizontalAlignement}> <View style={styles.horizontalAlignment}>
<Text style={styles.text}>Selected ingredients</Text> <Text style={styles.text}>Selected ingredients</Text>
<Pressable onPress={handlePress}> <Pressable onPress={props.onEvent}>
<Image source={parameter} style={{ width: 15, height: 15 }} /> <Image source={parameter} style={{tintColor: "#3F3C42", resizeMode: "contain", flex: 1, marginRight: "8%"}}/>
</Pressable> </Pressable>
</View> </View>
<View id="IngredientList" style={styles.horizontalAlignement}> <View style={styles.horizontalAlignment}>
<Pressable onPress={decreaseCounter} id="GoLeft" style={{}}> <Pressable onPress={decreaseCounter}>
<Image source={bracketLeft} style={{ width: 40, height: 40 }} /> <Image source={bracketLeft} style={{width: 40, height: 40, tintColor: "#3F3C42", resizeMode: "contain"}}/>
</Pressable> </Pressable>
<FoodElementText title={props.ingredientList[cpt].title}/>
<FoodElementText title={props.listeIngredient[cpt]} /> <Pressable onPress={increaseCounter}>
<Image source={bracketRight} style={{width: 40, height: 40, tintColor: "#3F3C42", resizeMode: "contain"}}/>
<Pressable onPress={increaseCounter} id="GoRight" style={{}}>
<Image source={bracketRight} style={{ width: 40, height: 40 }} />
</Pressable> </Pressable>
</View> </View>
</View> </View>
@ -61,30 +54,26 @@ export default function SelectedIngredient(props: SelectedIngredientProps) {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
view: { view: {
width: 350, width: "90%",
height: 110, paddingBottom: "5%",
borderRadius: 15, borderRadius: 15,
elevation: 3, borderColor: '#3F3C42',
borderWidth: 1,
borderColor: 'black',
display: 'flex',
flexWrap: 'wrap',
backgroundColor: '#E3DEC9', backgroundColor: '#E3DEC9',
alignItems: "center",
justifyContent: "center",
}, },
horizontalAlignement: { horizontalAlignment: {
display: 'flex', width: "90%",
height: 30,
width: 350,
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-around', justifyContent: 'space-evenly',
alignItems: 'center', alignItems: 'center',
marginTop: 10, marginTop: "3%",
}, },
text: { text: {
fontSize: 14, fontSize: 15,
lineHeight: 21,
fontWeight: 'bold', fontWeight: 'bold',
letterSpacing: 0.25, color: '#3F3C42',
color: 'black', flex: 1,
marginLeft: "8%",
}, },
}); });

@ -12,13 +12,12 @@ export default function TopBar(props) {
return ( return (
<Appbar.Header style={{backgroundColor: '#F2F0E4'}} > <Appbar.Header style={{backgroundColor: '#F2F0E4'}} >
<Appbar.Content title={props.title} /> <Appbar.BackAction onPress={_goBack} color={"#3F3C42"}/>
<Appbar.Content title={props.title} color={"#3F3C42"}/>
{props.isVisible && ( {props.isVisible &&(
<> <><Appbar.Action icon="magnify" onPress={_handleSearch} color={"#3F3C42"}/>
<Appbar.Action icon="magnify" onPress={_handleSearch} /> <Appbar.Action icon="dots-vertical" onPress={_handleMore} color={"#3F3C42"}/>
<Appbar.Action icon="dots-vertical" onPress={_handleMore} /> </>
</>
)} )}
</Appbar.Header> </Appbar.Header>
); );

@ -11,6 +11,23 @@ export default function CreateProfile(props) {
const colors = useContext(ColorContext).colors const colors = useContext(ColorContext).colors
const all = [] const all = []
const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}] const die = [{value: "Dairy free"}, {value: "Gluten free"}, {value: "Porkless"}, {value: "Vegan"}, {value: "Vegetarian"}, {value: "Pescatarian"}]
const handleCreateProfile = () => {
const profileData = {
name: "Nom du profil", // Remplacez par le nom du profil
avatar: "Lien de l'avatar", // Remplacez par le lien de l'avatar
diets: die.map(item => item.value), // Liste des régimes
allergies: all, // Liste des allergies
};
localStorage.setItem('profile', JSON.stringify(profileData));
console.log("Profil créé :", profileData);
// Redirection vers la page précédente avec un message de confirmation
props.navigation.goBack();
// Affichage d'un message
alert("Profil créé !");
};
const styles = StyleSheet.create({ const styles = StyleSheet.create({
linearGradient: { linearGradient: {
@ -29,7 +46,7 @@ export default function CreateProfile(props) {
<View style={{marginTop: "6%"}}/> <View style={{marginTop: "6%"}}/>
<ProfileModification name="" avatar="plus_small.png" diets={die} allergies={all}></ProfileModification> <ProfileModification name="" avatar="plus_small.png" diets={die} allergies={all}></ProfileModification>
<View style={{marginTop: "3%"}}/> <View style={{marginTop: "3%"}}/>
<ValidateButton title="Create Profile" image="plus.png" colour={colors.cardTitle} backColour={colors.cardBackground} todo={() => (console.log("Profile Created"))}></ValidateButton> <ValidateButton title="Create Profile" image="plus.png" colour={colors.cardTitle} backColour={colors.cardBackground} todo={handleCreateProfile}></ValidateButton>
<View style={{marginTop: "20%"}}/> <View style={{marginTop: "20%"}}/>
</LinearGradient> </LinearGradient>
</ScrollView> </ScrollView>

@ -1,7 +1,8 @@
import React, { useContext, useEffect, useState } from 'react'; import React, { useEffect, useState, useContext } from 'react';
import { View, StyleSheet, Text, Image, Pressable, ActivityIndicator, FlatList } from 'react-native'; import { View, StyleSheet, Text, Image, Pressable, ActivityIndicator, FlatList, ScrollView, useWindowDimensions } from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context'; import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Searchbar } from 'react-native-paper'; import { Searchbar } from 'react-native-paper';
import { LinearGradient } from 'expo-linear-gradient';
import FoodElementText from '../components/FoodElementText'; import FoodElementText from '../components/FoodElementText';
import CustomButton from '../components/CustomButton'; import CustomButton from '../components/CustomButton';
@ -47,8 +48,7 @@ export default function IngredientSelection(props) {
filterIngredients(query); filterIngredients(query);
}; };
const loadIngredients = async () => {
const loadIngredients = async () => {
try { try {
const ingredients = await ingredientService.getAllIngredient(); const ingredients = await ingredientService.getAllIngredient();
setResponse(ingredients); setResponse(ingredients);
@ -65,7 +65,7 @@ export default function IngredientSelection(props) {
const AvailableItem = ({ value }: { value: Ingredient }) => ( const AvailableItem = ({ value }: { value: Ingredient }) => (
<> <>
<View style={styles.horizontalAlignement}> <View style={styles.horizontalAlignment}>
<FoodElementText title={value.name} /> <FoodElementText title={value.name} />
<Pressable onPress={() => SelectIngredient(value)}> <Pressable onPress={() => SelectIngredient(value)}>
<Image source={plus} style={{ width: 20, height: 20 }} /> <Image source={plus} style={{ width: 20, height: 20 }} />
@ -77,7 +77,7 @@ export default function IngredientSelection(props) {
const ChooseItem = ({ value }: { value: Ingredient }) => ( const ChooseItem = ({ value }: { value: Ingredient }) => (
<> <>
<View style={styles.horizontalAlignement}> <View style={styles.horizontalAlignment}>
<FoodElementText title={value.name} /> <FoodElementText title={value.name} />
<Pressable onPress={() => RemoveIngredient(value.id)}> <Pressable onPress={() => RemoveIngredient(value.id)}>
<Image source={moins} style={{ width: 20, height: 20 }} /> <Image source={moins} style={{ width: 20, height: 20 }} />
@ -112,94 +112,91 @@ export default function IngredientSelection(props) {
}; };
return ( return (
<SafeAreaProvider> <SafeAreaProvider style={{flex: 1}}>
<View style={[styles.page, { backgroundColor: colors.primary }]}> <ScrollView>
<View style={[styles.element, { backgroundColor: colors.cardBackground}]}> <LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
<View style={{marginTop: "6%"}}/>
<View style={[styles.horizontalAlignement, { margin: 10 }]}> <View style={styles.element}>
{alphabetArray.map((source, index) => ( <View style={[styles.horizontalAlignment, { margin: 10 }]}>
<Pressable key={index} onPress={() => handleLetterPress(source)}> {alphabetArray.map((source, index) => (
<Text style={{ color: colors.cardDetail }}>{source}</Text> <Pressable key={index} onPress={() => handleLetterPress(source)}>
</Pressable> <Text style={{ color: "blue" }}>{source}</Text>
))} </Pressable>
</View> ))}
</View>
<View> <View>
<Searchbar <Searchbar
placeholder="Rechercher" placeholder="Search"
onChangeText={handleSearch} onChangeText={handleSearch}
value={searchQuery} value={searchQuery}
style={{ style={{margin: "3%",
margin: 10, backgroundColor: '#F2F0E4',
backgroundColor: colors.cardBackground, borderWidth : 1,
borderWidth: 1, borderColor: "#ACA279",
borderColor:colors.cardTitle, borderRadius: 15,
borderRadius: 15, }}/>
height: 50, </View>
}} /> <View style={{flex: 1, maxHeight: 300}}>
</View> <FlatList
data={response ? response : []}
<View style={{ alignItems: 'center', height: 300}}> renderItem={({ item }) => (
<FlatList <AvailableItem value={item} />
data={response ? response : []} )}
renderItem={({ item }) => ( keyExtractor={(item, index) => index.toString()}
<AvailableItem value={item} /> ListEmptyComponent={() => (
)} isLoading ? <ActivityIndicator size="large" /> : <Text>Erreur lors du traitement des données</Text>
keyExtractor={(item, index) => index.toString()} )}
ListEmptyComponent={() => ( style={{ flex: 1 }}
isLoading ? <ActivityIndicator size="large" /> : <Text>Erreur lors du traitement des données</Text> />
)} <View style={{ marginTop: '6%' }}></View>
style={{ flex: 1 }} </View>
/> </View>
</View> <View style={{marginTop: "6%"}}/>
<View style={{ height: 20 }}></View> <View style={styles.element}>
</View> <View style={[styles.horizontalAlignment, {justifyContent: "flex-start", marginLeft: "5%"}]}>
<Text style={{fontSize: 20, color: '#ACA279'}}>Available</Text>
<View style={[styles.element, { marginTop: 40, backgroundColor: colors.cardBackground }]}> </View>
<View style={[styles.horizontalAlignement, { justifyContent: "flex-start", marginLeft: 10 }]}> <View style={{flex: 1, maxHeight: 300}}>
<Text style={{ fontSize: 20, color: colors.cardTitle }}>Selected</Text> <FlatList
</View> data={selectedIngredients}
<View style={{ height: 5 }}></View> renderItem={({ item }) => (
<ChooseItem value={item} />
<View style={{ alignItems: 'center', maxHeight: 200}}> )}
<FlatList keyExtractor={(item, index) => index.toString()}
data={selectedIngredients} style={{ flex: 1 }}
renderItem={({ item }) => ( />
<ChooseItem value={item} /> <View style={{ height: 20 }}></View>
)} </View>
keyExtractor={(item, index) => index.toString()} </View>
style={{ flex: 1 }} <View style={{marginTop: "8%"}}></View>
/> <CustomButton title="Find a recipe"/>
</View> <View style={{marginBottom: "20%"}}></View>
</LinearGradient>
<View style={{ height: 20 }}></View> </ScrollView>
</View>
<View style={{ height: 15 }}></View>
<CustomButton title="Find a recipe" />
</View>
</SafeAreaProvider> </SafeAreaProvider>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
page: { linearGradient: {
flex: 1, width: "100%",
alignItems: 'center', flex: 1,
display: 'flex', padding: "3%",
flexWrap: 'wrap', paddingTop: 0,
padding: 20, alignItems: "center",
justifyContent: "flex-start",
}, },
element: { element: {
width: "100%",
backgroundColor:'#F2F0E4',
borderRadius: 30, borderRadius: 30,
}, },
horizontalAlignement: { horizontalAlignment: {
display: 'flex', width: "100%",
height: 30,
width: 350,
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-around', justifyContent: 'space-around',
alignItems: 'center', alignItems: 'center',
marginTop: 15, marginTop: "3%",
} }
}); });

@ -34,6 +34,23 @@ export default function Profiles({navigation, props}) {
setOpacity(1) setOpacity(1)
} }
const profiles = [
{
name: "Johnny Silverhand",
avatar: "plus_small.png",
diets: dieJohnny,
allergies: allJohnny,
},
{
name: "Jackie Welles",
avatar: "plus_small.png",
diets: dieJackie,
allergies: allJackie,
},
// ... Ajoutez d'autres profils ici de la même manière
];
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
height: "100%", height: "100%",
@ -143,39 +160,26 @@ export default function Profiles({navigation, props}) {
}, },
}); });
const profileComponents = profiles.map((profile, index) => (
<View key={index}>
<ProfileDetails
name={profile.name}
avatar={profile.avatar}
diets={profile.diets}
allergies={profile.allergies}
onDeleteProfile={raisePopUp}
/>
{index < profiles.length - 1 && <View style={styles.separator} />}
</View>
));
return ( return (
<SafeAreaProvider style={{flex: 1}}> <SafeAreaProvider style={{flex: 1}}>
<ScrollView> <ScrollView>
<View style={{opacity: opacity, height: "100%", width: "100%", flex: 1}}> <View style={{opacity: opacity, height: "100%", width: "100%", flex: 1}}>
<LinearGradient colors={[colors.primary, colors.primaryComplement]} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}> <LinearGradient colors={[colors.primary, colors.primaryComplement]} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
<View style={styles.separator}/> <View style={styles.separator}/>
<ProfileDetails {profileComponents}
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} />
<View style={styles.separator}/>
<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} />
<View style={styles.modal}> <View style={styles.modal}>
<Modal visible={visible} onRequestClose={erasePopUp} animationType="fade" transparent={true}> <Modal visible={visible} onRequestClose={erasePopUp} animationType="fade" transparent={true}>
<View style={styles.modal}> <View style={styles.modal}>
@ -210,4 +214,4 @@ export default function Profiles({navigation, props}) {
</ScrollView> </ScrollView>
</SafeAreaProvider> </SafeAreaProvider>
); );
} }

@ -1,11 +1,13 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { View, StyleSheet, Text} from 'react-native'; import { View, StyleSheet, Text, ScrollView, useWindowDimensions} from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context'; import { SafeAreaProvider } from 'react-native-safe-area-context';
import RecipeElementReduce from '../components/RecipeElementReduce'; import RecipeElementReduce from '../components/RecipeElementReduce';
import AllergiesTab from '../components/ListWithoutSelect'; import AllergiesTab from '../components/ListWithoutSelect';
import RecipesService from '../Services/Recipes/RecipesServices'; import RecipesService from '../Services/Recipes/RecipesServices';
import Recipes from '../Models/Recipes'; import Recipes from '../Models/Recipes';
import { LinearGradient } from 'expo-linear-gradient';
import ListWithoutSelect from '../components/ListWithoutSelect';
export default function RecipeDetails(props) { export default function RecipeDetails(props) {
@ -43,64 +45,75 @@ export default function RecipeDetails(props) {
return ( return (
<SafeAreaProvider> <SafeAreaProvider>
<View style={styles.page}> <ScrollView>
<RecipeElementReduce <LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
title={response.name} <View style={{marginTop: "6%"}}>
<RecipeElementReduce
title={response.name}
number={response.id} number={response.id}
duree={convertToHoursMinutes(response.time_to_cook)}/> duration={convertToHoursMinutes(response.time_to_cook)} image={''}/>
</View>
<View style={{height: 20}}></View> <View style={styles.separator}/>
<View style={styles.background}>
<View style={styles.element}> <View style={styles.filterBar}>
<View style={[styles.horizontalAlignement, {justifyContent: "flex-start", marginLeft: 10}]}> <Text style={styles.filters}>Preparation</Text>
<Text style={{fontSize: 20, color: '#ACA279'}}>Preparation</Text> </View>
</View> <ListWithoutSelect title="Ingredients" content={response.ingredients.map(ingredient => `- ${ingredient.name}`)}></ListWithoutSelect>
<View style={{margin: 20}}> <View style={{marginTop: "3%"}}/>
<AllergiesTab title="Ingredient" content={response.ingredients.map(ingredient => `- ${ingredient.name}`)}></AllergiesTab> </View>
<View style={styles.separator}/>
<View style={{height: 5}}></View> <View style={styles.background}>
{/* <AllergiesTab title="Ustensils" content={null}></AllergiesTab>*/} <View style={styles.filterBar}>
</View> <Text style={styles.filters}>Cooking</Text>
</View > </View>
<ListWithoutSelect title="Steps" content={response.steps.map((step, index) => `${index + 1} - ${step}`)}></ListWithoutSelect>
<View style={{height: 20}}></View> <View style={{marginTop: "3%"}}/>
</View>
<View style={styles.element}> <View style={{marginBottom: "20%"}}/>
<View style={[styles.horizontalAlignement, {justifyContent: "flex-start", marginLeft: 10}]}> </LinearGradient>
<Text style={{fontSize: 20, color: '#ACA279'}}>Cooking</Text> </ScrollView>
</View>
<View style={{margin: 20}}>
<AllergiesTab title="Steps" content={response.steps.map((step, index) => `${index + 1} - ${step}`)}></AllergiesTab>
</View>
</View>
</View>
</SafeAreaProvider> </SafeAreaProvider>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
page: { linearGradient: {
flex: 1, width: "100%",
backgroundColor: '#59BDCD', flex: 1,
alignItems: 'center', alignItems: "center",
display: 'flex', justifyContent: "flex-start"
flexWrap: 'wrap',
padding: 20,
}, },
element: { separator: {
backgroundColor:'#F2F0E4', marginTop: "6%",
borderRadius: 30, },
background: {
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 20,
backgroundColor: '#F2F0E4',
padding: "3%",
marginHorizontal: "3%",
},
filterBar: {
flexDirection: "row",
width: "85%",
paddingTop: "3%",
paddingBottom: "2%",
alignItems: "flex-end",
justifyContent: "center",
},
filters: {
fontSize: 20,
color: '#ACA279',
flex: 1,
},
nbSelected: {
fontSize: 11,
color: "#3F3C42",
textAlign: "right",
}, },
horizontalAlignement: {
display: 'flex',
height: 30,
width: 350,
flexDirection: 'row',
justifyContent: 'space-around',
alignItems: 'center',
marginTop: 10,
}
}); });

@ -1,176 +1,242 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { View, StyleSheet, Text, Image, Pressable} from 'react-native'; import {View, StyleSheet, Text, Image, Pressable, useWindowDimensions, ScrollView} from 'react-native';
import { SafeAreaProvider } from 'react-native-safe-area-context'; import {SafeAreaProvider } from 'react-native-safe-area-context';
import { Modal, Portal, PaperProvider} from 'react-native-paper'; import {Modal, Portal, PaperProvider} from 'react-native-paper';
import {LinearGradient} from 'expo-linear-gradient';
import TopBar from '../components/TopBar'; import TopBar from '../components/TopBar';
import RecipeElement from '../components/RecipeElement'; import RecipeElement from '../components/RecipeElement';
import SelectedIngredient from '../components/SelectedIngredient'; import SelectedIngredient from '../components/SelectedIngredient';
import FoodElementTextSimple from '../components/FoodElementTextSimple';
import FoodElementText from '../components/FoodElementText'; import FoodElementText from '../components/FoodElementText';
import CustomButton from '../components/CustomButton'; import CustomButton from '../components/CustomButton';
import DietsTab from '../components/DietsTab'; import DietsTab from '../components/ListSelect';
import brochette from '../assets/images/brochette.png'; import brochette from '../assets/images/brochette.png';
import ParameterTopBar from '../components/ParameterTopBar'; import ParameterTopBar from '../components/ParameterTopBar';
import ListSelect from '../components/ListSelect';
import ListWithoutSelect from '../components/ListWithoutSelect';
import ValidateButton from '../components/ValidateButton';
import bracketLeft from '../assets/images/angle_bracket_left.png'; import bracketLeft from '../assets/images/angle_bracket_left.png';
import bracketRight from '../assets/images/angle_bracket_right.png'; import bracketRight from '../assets/images/angle_bracket_right.png';
import plus from '../assets/images/plus_small.png';
import minus from '../assets/images/minus.png';
export default function RecipeSuggestion(props) { export default function RecipeSuggestion(props) {
const imageList = [];
const [visible, setVisible] = React.useState(false); const [visible, setVisible] = React.useState(false);
const [visibleFilters, setVisibleFilters] = React.useState(false); const [visibleFilters, setVisibleFilters] = React.useState(false);
const [visibleIngredients, setVisibleIngredients] = React.useState(true); const [visibleIngredients, setVisibleIngredients] = React.useState(true);
const [minCpt, setMinCpt] = useState(0); const [minCpt, setMinCpt] = useState(0);
const [maxCpt, setMaxCpt] = useState(4); const [maxCpt, setMaxCpt] = useState(4);
const listeIngredient = props.list; const ingredientList = [{title: "Steak"}, {title: "Sheep Ribs"}, {title: "Rabbit Thigh"}, {title: "Ham"}, {title: "Cream (Liquid)"}, {title: "Pepper Bell"}]
const limitedList = listeIngredient.slice(minCpt, maxCpt); const ingredientListV2 = [{title: "Smoked Salmon"}, {title: "Tomato"}, {title: "Carrot"}]
const showModal = () => setVisible(true); const limitedList = ingredientList.slice(minCpt, maxCpt);
const hideModal = () => setVisible(false); const [colorIngredients, setColorIngredients] = useState("#59BDCD");
const [colorFilters, setColorFilters] = useState("#3F3C42");
const die = [{value: "Gluten free"}, {value: "Porkless"}, {value: "Gluten free"}, {value: "Porkless"}]
const all = []
const containerStyle = { const containerStyle = {
backgroundColor: 'white', //minHeight: useWindowDimensions().height/2,
height: 450, //width: useWindowDimensions().width,
width: 380, height: "75%",
width: "100%",
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
}; };
const handleChildEvent = (value) => { const handleChildEvent = () => {
setVisible(!visible) setVisible(!visible)
}; }
const handleChildEventGoFilters = () => {
const handleChildEventGoFilters = (value) => {
setVisibleIngredients(false); setVisibleIngredients(false);
setVisibleFilters(true); setVisibleFilters(true);
setColorFilters("#59BDCD")
setColorIngredients("#3F3C42")
} }
const handleChildEventGoIngredients = () => {
const handleChildEventGoIngredients = (value) => {
setVisibleFilters(false); setVisibleFilters(false);
setVisibleIngredients(true); setVisibleIngredients(true);
console.log("jai change pour iingredient"); setColorFilters("#3F3C42")
setColorIngredients("#59BDCD")
} }
const decreaseCounter = () => { const decreaseCounter = () => {
if (minCpt > 0) { if (minCpt > 0) {
setMinCpt(minCpt - 4); setMinCpt(minCpt - 4);
setMaxCpt(maxCpt - 4) setMaxCpt(maxCpt - 4)
} }
}; else{
setMaxCpt(ingredientList.length+ingredientList.length%4)
var cpt=ingredientList.length-(ingredientList.length%4)
setMinCpt(cpt)
}
}
const increaseCounter = () => { const increaseCounter = () => {
if (maxCpt < listeIngredient.length) { if (maxCpt < ingredientList.length) {
setMinCpt(minCpt + 4); setMinCpt(minCpt + 4);
setMaxCpt(maxCpt + 4) setMaxCpt(maxCpt + 4)
} }
}; else{
setMinCpt(0)
setMaxCpt(4)
}
}
const imageElements = limitedList.map((source, index) => ( const imageElements = limitedList.map((source, index) => (
<View style={[styles.horizontalAlignement, { marginBottom: 10 }]}> <View style={[styles.horizontalAlignment, {marginVertical: "3%"}]}>
<FoodElementText key={index} title={source} /> <FoodElementTextSimple title={source.title}/>
<Image source={brochette} style={{ width: 20, height: 20 }} /> <Image source={plus} style={{width: 20, resizeMode: "contain"}}/>
<Image source={brochette} style={{ width: 20, height: 20 }} /> <Image source={minus} style={{width: 20, resizeMode: "contain"}}/>
</View> </View>
)); ));
return ( return (
<SafeAreaProvider> <SafeAreaProvider style={{flex: 1}}>
<PaperProvider>
<TopBar title="Recipes" isVisible="true"/> <TopBar title="Recipes" isVisible="true"/>
<View style={styles.page}> <ScrollView>
<SelectedIngredient <LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {minHeight: useWindowDimensions().height}]}>
listeIngredient={props.list} <View style={{marginTop: "6%"}}/>
listeImage={imageList} <SelectedIngredient
onEvent={handleChildEvent} ingredientList={ingredientList}
/> onEvent={handleChildEvent}/>
<View style={{ marginTop: 100 }}> <ScrollView style={{marginTop: "6%"}} horizontal={true}>
<RecipeElement <View style={{marginHorizontal: 10}}/>
number="13" <RecipeElement
title="Pizza with Pineapples" number="63"
imageList={imageList} title="Meat Stick"
textList={props.list} textList={ingredientList}
description="delicious plate that will please you" description="Delicious stick with 4 meats. Accessible for beginners. 20 min or less to cook."/>
style={styles.element} <View style={{marginHorizontal: 10}}/>
/> <RecipeElement
</View> number="03"
</View> title="Vichyssoise"
<View style={styles.modal}> textList={ingredientListV2}
<PaperProvider> description="Cold soup of vegetables. Difficult recipe. Not advised to beginners. 1h or more."/>
<Portal> <View style={{marginHorizontal: 10}}/>
<Modal visible={visible} onDismiss={hideModal} contentContainerStyle={containerStyle}> </ScrollView>
<ParameterTopBar onEventFilter={handleChildEventGoFilters} onEventIngredient={handleChildEventGoIngredients}></ParameterTopBar> <View style={{marginBottom: "20%"}}/>
</LinearGradient>
{visibleIngredients && ( </ScrollView>
<View style={[styles.page, { justifyContent: 'space-between' }]}> <Portal>
{imageElements} <Modal visible={visible} onDismiss={handleChildEvent} contentContainerStyle={containerStyle} style={{marginTop: 0, justifyContent: "flex-end"}}>
<View id="IngredientList" style={[styles.horizontalAlignement, {marginTop: 10}]}> <ParameterTopBar onEventFilter={handleChildEventGoFilters} onEventIngredient={handleChildEventGoIngredients} colorFilters={colorFilters} colorIngredients={colorIngredients}/>
<Pressable onPress={decreaseCounter} id="GoLeft" > {visibleIngredients &&(
<Image source={bracketLeft} style={{ width: 20, height: 20 }} /> <LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {paddingHorizontal: "3%"}]}>
</Pressable> {imageElements}
<View style={[styles.horizontalAlignment, {marginTop: "6%"}]}>
<Pressable onPress={increaseCounter} id="GoRight"> <Pressable onPress={decreaseCounter}>
<Image source={bracketRight} style={{ width: 20, height: 20 }} /> <Image source={bracketLeft} style={{width: 30, height: "100%", resizeMode: "contain", tintColor: "#3F3C42"}}/>
</Pressable> </Pressable>
</View> <CustomButton title="Save"></CustomButton>
<Pressable onPress={increaseCounter}>
<View> <Image source={bracketRight} style={{width: 30, height: "100%", resizeMode: "contain", tintColor: "#3F3C42"}}/>
<CustomButton title="Save"></CustomButton> </Pressable>
</View>
</View> </View>
)} </LinearGradient>
{visibleFilters &&( )}
<View style={[styles.page, { justifyContent: 'space-between', alignContent: 'center'}]}> {visibleFilters &&(
<ScrollView>
<View style={{backgroundColor: '#F2F0E4', zIndex: 2}}> <LinearGradient colors={['#2680AA', '#59BDCD']} style={[styles.linearGradient, {paddingHorizontal: "3%"}]}>
<View style={[styles.horizontalAlignement, {justifyContent: "flex-start", marginLeft: 20}]}> <View style={{marginTop: "10%"}}/>
<Text style={{fontSize: 20, color: '#ACA279'}}>Available</Text> <View style={styles.background}>
</View> <View style={styles.filterBar}>
<View style={{alignContent: 'center', justifyContent: 'space-between', margin: 10}}> <Text style={styles.filters}>Additional Filters</Text>
<DietsTab title="Diets" content={props.diets}></DietsTab> <Text style={styles.nbSelected}>{die.length} selected</Text>
<View style={{height: 5}}></View>
<DietsTab title="Allergy" content={props.allergy}></DietsTab>
</View>
</View> </View>
<View style={{zIndex: 1, position: 'absolute', marginTop: 300}} > <ListWithoutSelect title="Diets" content={die}></ListWithoutSelect>
<CustomButton title="Save"></CustomButton> <View style={{marginTop: "3%"}}/>
</View> <ListWithoutSelect title="Allergies" content={all}></ListWithoutSelect>
</View> <View style={{marginTop: "3%"}}/>
)} <ValidateButton title="Add Allergy" image="plus.png" colour="#59BDCD" backColour="#E3DEC9"></ValidateButton>
</Modal> </View>
</Portal> <View style={{marginTop: "6%"}}/>
</PaperProvider> <View>
</View> <CustomButton title="Save"></CustomButton>
</View>
<View style={{marginTop: "43%"}}/>
</LinearGradient>
</ScrollView>
)}
</Modal>
</Portal>
</PaperProvider>
</SafeAreaProvider> </SafeAreaProvider>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
page: { linearGradient: {
flex: 1, width: "100%",
backgroundColor: '#59BDCD', flex: 1,
alignItems: 'center', //padding: "2%",
display: 'flex', paddingTop: 0,
flexWrap: 'wrap', alignItems: "center",
padding: 20, justifyContent: "center"
},
background: {
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 20,
backgroundColor: '#F2F0E4',
padding: "3%",
marginHorizontal: "3%",
},
filterBar: {
flexDirection: "row",
width: "85%",
paddingTop: "3%",
paddingBottom: "2%",
alignItems: "flex-end",
justifyContent: "center",
}, },
element: { filters: {
marginTop: 20, fontSize: 20,
color: '#ACA279',
flex: 1,
}, },
backdrop: { nbSelected: {
backgroundColor: 'rgba(0, 0, 0, 0.5)', fontSize: 11,
color: "#3F3C42",
textAlign: "right",
}, },
page: {
flex: 1,
backgroundColor: '#59BDCD',
alignItems: 'center',
paddingHorizontal: "3%",
},
modal :{ modal :{
position: 'absolute', position: 'absolute',
top: '50%', // Centre verticalement top: '50%',
left: '50%', // Centre horizontalement height: "50%",
transform: [{ translateX: -185 }, { translateY: -90 }], // Ajustez en fonction de la moitié de la hauteur et de la largeur width: "100%",
borderWidth: 1,
borderColor: "red",
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
}, },
horizontalAlignement: { horizontalAlignment: {
display: 'flex', display: 'flex',
height: 30, height: "10%",
width: '80%', width: "100%",
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-around', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
marginTop: 10, },
}
recipes: {
flexDirection: "row",
overflow: "scroll",
alignItems: "flex-start",
justifyContent: "center",
},
}); });

@ -0,0 +1,4 @@
{
"compilerOptions": {},
"extends": "expo/tsconfig.base"
}
Loading…
Cancel
Save