Skip to content

Instantly share code, notes, and snippets.

@ritik-sw
Created June 30, 2022 05:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ritik-sw/fb64d9b35a5608e89b7c252f6cb85b99 to your computer and use it in GitHub Desktop.
Save ritik-sw/fb64d9b35a5608e89b7c252f6cb85b99 to your computer and use it in GitHub Desktop.
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