Create hook useCart
This commit is contained in:
@@ -12,8 +12,8 @@ interface MenuItemProps {
|
||||
}
|
||||
|
||||
const MenuItem = ({ food }: MenuItemProps) => {
|
||||
const quantity = useReceiptStore(state => state.items[food.id]?.quantity || 0);
|
||||
|
||||
const quantity = useReceiptStore(state => state.items[food.id]?.quantity || 0);
|
||||
const increment = useReceiptStore(state => state.increment);
|
||||
const decrement = useReceiptStore(state => state.decrement);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user