diff --git a/frontend/src/components/GroceryListItem.jsx b/frontend/src/components/GroceryListItem.jsx index 7500436..6e8c02f 100644 --- a/frontend/src/components/GroceryListItem.jsx +++ b/frontend/src/components/GroceryListItem.jsx @@ -56,7 +56,9 @@ export default function GroceryListItem({ item, onClick, onImageAdded, onLongPre }; const handleItemClick = () => { - setShowConfirmBuyModal(true); + if (onClick) { + setShowConfirmBuyModal(true); + } }; const handleConfirmBuy = (quantity) => {