Created
June 30, 2022 05:40
-
-
Save ritik-sw/fb64d9b35a5608e89b7c252f6cb85b99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rendertodoItem = ({item}) => { | |
if (!item) { | |
return null; | |
} | |
const handlerLongClick = id => { | |
//handler for Long Click | |
Alert.alert(' ', 'Want to delete this farmer?', [ | |
{ | |
text: 'No', | |
onPress: () => console.log('Cancel Pressed'), | |
style: 'cancel', | |
}, | |
{ | |
text: 'Yes', | |
onPress: () => {alert("Deleted") } | |
}, | |
]); | |
}; | |
return ( | |
<TouchableOpacity | |
style={{backgroundColor: "white"}} | |
onPress={()=>navigation.navigate('UpdateUserProfile',{ | |
task:item.headText, | |
existingAddress:item.existingAddress, | |
newAdrress:item.newAddress | |
})} | |
> | |
<View style={styles.todoListWrapper}> | |
<Text style={styles.cardHeadingText}>{item.headText}</Text> | |
<Text style={styles.status}>{item.status}</Text> | |
<Text style={styles.childText}>Assigned on: {item.assignedDate}</Text> | |
<Text style={styles.childText}>Due date: {item.dueDate}</Text> | |
<Text style={styles.childTextSubmitted}>Submitted By: <Image source={profileIcon} style={{width:12,height:12}} /></Text> | |
</View> | |
</TouchableOpacity> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment