From f7860a5af8e63629da37d86e58c2a23aca26c276 Mon Sep 17 00:00:00 2001 From: Dejan Date: Mon, 16 Dec 2024 23:39:32 +0100 Subject: [PATCH] - Fixed issue with parents not being able to approve groceries --- components/pages/grocery/GroceryItem.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/pages/grocery/GroceryItem.tsx b/components/pages/grocery/GroceryItem.tsx index ec652b2..2d4d0eb 100644 --- a/components/pages/grocery/GroceryItem.tsx +++ b/components/pages/grocery/GroceryItem.tsx @@ -109,12 +109,12 @@ const GroceryItem = ({ {!item.approved ? ( - {isParent || isCaregiver && ( + {(isParent || isCaregiver) && ( <> handleItemApproved(item.id, { approved: true }) } @@ -140,10 +140,8 @@ const GroceryItem = ({ name="close" size={24} style={{ color: "grey", marginRight: 10 }} - onPress={() => { - handleItemApproved(item.id, { approved: false }); - deleteGrocery(item.id); - }}/> + onPress={() => deleteGrocery(item.id)} + /> }