diff --git a/components/pages/grocery/EditGroceryItem.tsx b/components/pages/grocery/EditGroceryItem.tsx
index 4f8e559..fd5cf83 100644
--- a/components/pages/grocery/EditGroceryItem.tsx
+++ b/components/pages/grocery/EditGroceryItem.tsx
@@ -113,24 +113,24 @@ const EditGroceryItem = ({
}}
maxLength={25}
/>
-
+ {(editGrocery.title || editGrocery.title !== "") &&
{
- if (editGrocery.closeEdit) {
- editGrocery.closeEdit();
- }
- }}
+ onPress={() => {
+ if (editGrocery.closeEdit) {
+ editGrocery.closeEdit();
+ }
+ }}
/>
-
+ }
void}) => {
setPendingGroceries(groceries?.filter((item) => !item.approved));
}, [groceries]);
+ const handleCancelAddGrocery = () => {
+ setIsAddingGrocery(false);
+ setTitle("");
+ setCategory(GroceryCategory.None)
+ }
+
return (
void}) => {
- {isAddingGrocery && (
-
- setIsAddingGrocery(false)
- }}
- onInputFocus={onInputFocus}
- />
-
- )}
+
+
+
{/* Render Approved Groceries Grouped by Category */}
{approvedGroceries?.length > 0
diff --git a/components/pages/grocery/GroceryWrapper.tsx b/components/pages/grocery/GroceryWrapper.tsx
index b93db37..e62e667 100644
--- a/components/pages/grocery/GroceryWrapper.tsx
+++ b/components/pages/grocery/GroceryWrapper.tsx
@@ -71,7 +71,6 @@ const GroceryWrapper = () => {
- {!isAddingGrocery && }
>
);
};