|
|
|
@ -1,14 +1,14 @@
|
|
|
|
|
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 { StyleSheet, Text, View, Image, Pressable } from 'react-native';
|
|
|
|
|
import { useNavigation } from '@react-navigation/native';
|
|
|
|
|
|
|
|
|
|
import ListWithoutSelect from './ListWithoutSelect';
|
|
|
|
|
|
|
|
|
|
type ProfileProps = {
|
|
|
|
|
name: string
|
|
|
|
|
avatar: string
|
|
|
|
|
diets: list<string>
|
|
|
|
|
allergies: list<string>
|
|
|
|
|
diets: string[]
|
|
|
|
|
allergies: string[]
|
|
|
|
|
onDeleteProfile: () => void
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -41,9 +41,7 @@ export default function ProfileDetails(props) {
|
|
|
|
|
<View style={styles.pseudoBar}>
|
|
|
|
|
<Image source={imageSource} style={styles.avatar}></Image>
|
|
|
|
|
<Text style={styles.text}>{props.name}</Text>
|
|
|
|
|
<Pressable onPress={() => navigation.navigate('ProfileModification')}>
|
|
|
|
|
<Image source={require("../assets/images/modify.png")} style={styles.modify}></Image>
|
|
|
|
|
</Pressable>
|
|
|
|
|
<Pressable onPress={props.onDeleteProfile} style={{flex: 0.1, marginLeft: "1%",}}>
|
|
|
|
|
<Image source={require("../assets/images/delete.png")} style={styles.delete}></Image>
|
|
|
|
|
</Pressable>
|
|
|
|
@ -55,7 +53,7 @@ export default function ProfileDetails(props) {
|
|
|
|
|
<Image source={require("../assets/images/arrow.png")} style={styles.arrow}></Image>
|
|
|
|
|
</View>
|
|
|
|
|
</Pressable>
|
|
|
|
|
<View style={{display: display === "flex" ? 'flex' : 'none', alignItems: "center", justifyContent: "center"}}>
|
|
|
|
|
<View style={{display: display === 'flex' ? 'flex' : 'none', alignItems: "center", justifyContent: "center"}}>
|
|
|
|
|
<ListWithoutSelect title="Diets" content={props.diets}></ListWithoutSelect>
|
|
|
|
|
<View style={{marginTop: "3%"}}/>
|
|
|
|
|
<ListWithoutSelect title="Allergies" content={props.allergies}></ListWithoutSelect>
|
|
|
|
|