mirror of
https://github.com/urosran/cally.git
synced 2025-07-15 17:47:08 +00:00
- Added delete button on the checked grocery items
This commit is contained in:
@ -134,17 +134,29 @@ const GroceryItem = ({
|
||||
) : (
|
||||
!isEditingTitle &&
|
||||
(isParent || isCaregiver) && (
|
||||
<Checkbox
|
||||
value={item.bought}
|
||||
containerStyle={[styles.checkbox, { borderRadius: 50 }]}
|
||||
style={styles.checked}
|
||||
borderRadius={50}
|
||||
color="#fd1575"
|
||||
hitSlop={20}
|
||||
onValueChange={() =>
|
||||
updateGroceryItem({ id: item.id, bought: !item.bought })
|
||||
}
|
||||
/>
|
||||
<View row>
|
||||
{item.bought &&
|
||||
<AntDesign
|
||||
name="close"
|
||||
size={24}
|
||||
style={{ color: "grey", marginRight: 10 }}
|
||||
onPress={() => {
|
||||
handleItemApproved(item.id, { approved: false });
|
||||
deleteGrocery(item.id);
|
||||
}}/>
|
||||
}
|
||||
<Checkbox
|
||||
value={item.bought}
|
||||
containerStyle={[styles.checkbox, { borderRadius: 50 }]}
|
||||
style={styles.checked}
|
||||
borderRadius={50}
|
||||
color="#fd1575"
|
||||
hitSlop={20}
|
||||
onValueChange={() =>
|
||||
updateGroceryItem({ id: item.id, bought: !item.bought })
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
)}
|
||||
</View>
|
||||
|
Reference in New Issue
Block a user