profiles was not displayed as it should, now working
continuous-integration/drone/push Build is failing Details

pull/20/head
Rémi REGNAULT 1 year ago
parent 87edec02d1
commit 07a865b9c8

@ -6,7 +6,7 @@ import { MultipleSelectList, SelectList } from 'react-native-dropdown-select-lis
type ListProps = { type ListProps = {
title: string title: string
content : list<string> content : string[]
} }
export default function ListSelect(props: ListProps) { export default function ListSelect(props: ListProps) {

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

Loading…
Cancel
Save