try to bind images but it dont work
continuous-integration/drone/push Build is passing Details

pull/20/head
Rayhân HASSOU 1 year ago
parent 4f165411da
commit dcb7cee057

@ -36,14 +36,12 @@ export default function ProfileElement(props : Profile) {
} }
let imageSource let imageSource
if (props.avatar == "plus.png"){ if(props.avatar == null){
imageSource = require('../assets/images/plus.png') console.log("NUUUULLLLLE" + props.avatar)
}
else if (props.avatar == "plus_small.png"){
imageSource = require('../assets/images/plus_small.png')
} }
else{ else{
imageSource = require('../assets/images/logo.png') imageSource = { uri: props.avatar };
console.log("MAAARCHHEEE" + props.avatar)
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({

@ -42,13 +42,13 @@ export default function CreateProfile(props) {
let imageSource let imageSource
if (props.avatar == "plus.png"){ if (props.avatar == "plus.png"){
imageSource = require('../assets/images/plus.png') imageSource = {uri: avatar}
} }
else if (props.avatar == "plus_small.png"){ else if (props.avatar == "plus_small.png"){
imageSource = require('../assets/images/plus_small.png') imageSource = {uri: avatar}
} }
else{ else{
imageSource = require('../assets/images/logo.png') imageSource = {uri: avatar}
} }
const handleCreateProfile = async () => { const handleCreateProfile = async () => {
@ -169,7 +169,7 @@ export default function CreateProfile(props) {
</View> </View>
<View style={styles.filterBar}> <View style={styles.filterBar}>
<Text style={styles.filters}>Filters</Text> <Text style={styles.filters}>Filters</Text>
<Text style={styles.nbSelected}>0 diets selected</Text> <Text style={styles.nbSelected}>"0 diets selected</Text>
</View> </View>
<ListSelect title="Diets" content={die} setSelected={handleSelectedDiets}></ListSelect> <ListSelect title="Diets" content={die} setSelected={handleSelectedDiets}></ListSelect>
<View style={{marginTop: "6%"}}/> <View style={{marginTop: "6%"}}/>

@ -211,13 +211,12 @@ export default function Profiles({navigation, props}) {
<View style={styles.modal}> <View style={styles.modal}>
<View style={styles.viewModal}> <View style={styles.viewModal}>
<View style={styles.profileValidation}> <View style={styles.profileValidation}>
<ProfileDelete name="Johnny Silverhand" avatar="plus_small.png" diets={die} allergies={all}></ProfileDelete> {/* <ProfileDelete
{/* <ProfileDelete
name={profiles[selectedProfileIndex].name} name={profiles[selectedProfileIndex].name}
avatar={profiles[selectedProfileIndex].avatar} avatar={profiles[selectedProfileIndex].avatar}
diets={profiles[selectedProfileIndex].diets} diets={profiles[selectedProfileIndex].diets}
allergies={profiles[selectedProfileIndex].allergies} allergies={profiles[selectedProfileIndex].allergies}
/> */} /> */}
</View> </View>
<View style={styles.decisionBarVertical}> <View style={styles.decisionBarVertical}>
<Text style={styles.validationQuestion}>Do you really want to delete this profile?</Text> <Text style={styles.validationQuestion}>Do you really want to delete this profile?</Text>

Loading…
Cancel
Save